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