Class: Generator::Entrypoint
- Inherits:
-
Object
- Object
- Generator::Entrypoint
- Includes:
- Utils
- Defined in:
- lib/generator/entrypoint.rb
Instance Attribute Summary collapse
-
#apis ⇒ Object
readonly
Returns the value of attribute apis.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(apis) ⇒ Entrypoint
constructor
A new instance of Entrypoint.
- #required_libraries ⇒ Object
Methods included from Utils
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
#apis ⇒ Object (readonly)
Returns the value of attribute apis.
12 13 14 |
# File 'lib/generator/entrypoint.rb', line 12 def apis @apis end |
Instance Method Details
#generate ⇒ Object
18 19 20 |
# File 'lib/generator/entrypoint.rb', line 18 def generate File.write(file_path, render_template) end |
#required_libraries ⇒ Object
22 23 24 |
# File 'lib/generator/entrypoint.rb', line 22 def required_libraries apis.map(&:library_name).append("peddler/token").sort end |