Class: W3cApi::Commands::Translation
- Inherits:
-
Thor
- Object
- Thor
- W3cApi::Commands::Translation
- Includes:
- OutputFormatter
- Defined in:
- lib/w3c_api/commands/translation.rb
Overview
Thor CLI command for translation operations
Instance Method Summary collapse
Methods included from OutputFormatter
Instance Method Details
#fetch ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/w3c_api/commands/translation.rb', line 17 def fetch client = W3cApi::Client.new translations = if [:id] # Single specification version client.translation([:id]) else # All translations client.translations end output_results(translations, [:format]) end |