Class: W3cApi::Commands::Series
- Inherits:
-
Thor
- Object
- Thor
- W3cApi::Commands::Series
- Includes:
- OutputFormatter
- Defined in:
- lib/w3c_api/commands/series.rb
Overview
Thor CLI command for series 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/series.rb', line 17 def fetch client = W3cApi::Client.new series = if [:shortname] # Single series client.series_by_shortname([:shortname]) else # All series client.series end output_results(series, [:format]) end |
#specifications ⇒ Object
35 36 37 38 39 |
# File 'lib/w3c_api/commands/series.rb', line 35 def specifications client = W3cApi::Client.new specifications = client.series_specifications([:shortname]) output_results(specifications, [:format]) end |