Class: Lang::Cli
- Inherits:
-
Thor
- Object
- Thor
- Lang::Cli
- Defined in:
- lib/lang/cli.rb
Constant Summary collapse
- NAME_REGEX =
/^(?:#{Subtags::SUBTAG}|#{Subtags::TAG}):\s*([\w-]+)\s*$/io.freeze
- TYPE_REGEX =
/^#{Subtags::TYPE}:\s*(\w+)\s*$/io.freeze
Instance Method Summary collapse
Instance Method Details
#index(path = Lang::Subtags.registry_path) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/lang/cli.rb', line 14 def index(path = Lang::Subtags.registry_path) @path = File.(path) if !exists? || .update? download 'http://www.iana.org/assignments/language-subtag-registry' end build_indices end |