Class: W3cApi::Commands::Specification

Inherits:
Thor
  • Object
show all
Includes:
OutputFormatter
Defined in:
lib/w3c_api/commands/specification.rb

Overview

Thor CLI command for specification operations

Instance Method Summary collapse

Methods included from OutputFormatter

#output_results

Instance Method Details

#deliverersObject



82
83
84
85
86
# File 'lib/w3c_api/commands/specification.rb', line 82

def deliverers
  client = W3cApi::Client.new
  deliverers = client.specification_deliverers(options[:shortname])
  output_results(deliverers, options[:format])
end

#editorsObject



71
72
73
74
75
# File 'lib/w3c_api/commands/specification.rb', line 71

def editors
  client = W3cApi::Client.new
  editors = client.specification_editors(options[:shortname])
  output_results(editors, options[:format])
end

#fetchObject



22
23
24
25
26
# File 'lib/w3c_api/commands/specification.rb', line 22

def fetch
  client = W3cApi::Client.new
  specifications = fetch_specifications(client)
  output_results(specifications, options[:format])
end

#superseded_byObject



59
60
61
62
63
64
# File 'lib/w3c_api/commands/specification.rb', line 59

def superseded_by
  # We need to add client.specification_superseded_by method in the client
  client = W3cApi::Client.new
  specifications = client.specification_superseded_by(options[:shortname])
  output_results(specifications, options[:format])
end

#supersedesObject



46
47
48
49
50
51
# File 'lib/w3c_api/commands/specification.rb', line 46

def supersedes
  # We need to add client.specification_supersedes method in the client
  client = W3cApi::Client.new
  specifications = client.specification_supersedes(options[:shortname])
  output_results(specifications, options[:format])
end

#versionsObject



34
35
36
37
38
# File 'lib/w3c_api/commands/specification.rb', line 34

def versions
  client = W3cApi::Client.new
  versions = client.specification_versions(options[:shortname])
  output_results(versions, options[:format])
end