Class: Weneedfeed::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/weneedfeed/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Note:

Override for thor breaking change. See github.com/erikhuda/thor/issues/244.

Returns:

  • (Boolean)


11
12
13
# File 'lib/weneedfeed/command.rb', line 11

def exit_on_failure?
  true
end

Instance Method Details

#buildObject

Parameters:

  • base_url (String)
  • schema_path (String)


37
38
39
40
41
42
# File 'lib/weneedfeed/command.rb', line 37

def build
  ::Weneedfeed::Capture.call(
    base_url: options[:base_url],
    schema_path: options[:schema_path]
  )
end

#serverObject



63
64
65
66
# File 'lib/weneedfeed/command.rb', line 63

def server
  application = Weneedfeed::Application.new(schema_path: options[:schema_path])
  ::Rack::Handler.default.run(application, Port: options[:port])
end