Class: Generator::Entrypoint

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/generator/entrypoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#pascalcase, #snakecase

Constructor Details

#initialize(apis) ⇒ Entrypoint

Returns a new instance of Entrypoint.



14
15
16
# File 'lib/generator/entrypoint.rb', line 14

def initialize(apis)
  @apis = apis
end

Instance Attribute Details

#apisObject (readonly)

Returns the value of attribute apis.



12
13
14
# File 'lib/generator/entrypoint.rb', line 12

def apis
  @apis
end

Instance Method Details

#generateObject



18
19
20
# File 'lib/generator/entrypoint.rb', line 18

def generate
  File.write(file_path, render_template)
end

#required_librariesObject



22
23
24
# File 'lib/generator/entrypoint.rb', line 22

def required_libraries
  apis.map(&:library_name).append("peddler/token").sort
end