Class: Gutsy::Generator::Heroics

Inherits:
Object
  • Object
show all
Defined in:
lib/gutsy/generator/heroics.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_version_state, output_path) ⇒ Heroics

Returns a new instance of Heroics.



8
9
10
11
# File 'lib/gutsy/generator/heroics.rb', line 8

def initialize(api_version_state, output_path)
  @api_version_state = api_version_state
  @output_path = output_path
end

Class Method Details

.generate(api_version_state, output_path) ⇒ Object



4
5
6
# File 'lib/gutsy/generator/heroics.rb', line 4

def self.generate(api_version_state, output_path)
  new(api_version_state, output_path).generate
end

Instance Method Details

#generateObject



13
14
15
16
17
18
19
# File 'lib/gutsy/generator/heroics.rb', line 13

def generate
  system "heroics-generate \
    #{module_name} \
    #{api_version_state.schema_path} \
    #{api_url} > \
    #{client_output_path}"
end