diff options
Diffstat (limited to 'lib/tag.rb')
| -rw-r--r-- | lib/tag.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/tag.rb b/lib/tag.rb deleted file mode 100644 index a7c13b2..0000000 --- a/lib/tag.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Nuldoc - Tag = Struct.new(:slug, :label, keyword_init: true) do - LABELS = { - 'conference' => 'カンファレンス', - 'cpp' => 'C++', - 'cpp17' => 'C++ 17', - 'note-to-self' => '備忘録', - 'php' => 'PHP', - 'phpcon' => 'PHP カンファレンス', - 'phperkaigi' => 'PHPerKaigi', - 'python' => 'Python', - 'python3' => 'Python 3', - 'ruby' => 'Ruby', - 'ruby3' => 'Ruby 3', - 'rust' => 'Rust', - 'vim' => 'Vim', - } - - def self.from_slug(slug) - Tag.new( - slug: slug, - label: (LABELS[slug] || raise("No label for tag '#{slug}'")), - ) - end - end -end |
