Class: GrapeCli::Config
- Inherits:
-
Object
- Object
- GrapeCli::Config
- Defined in:
- lib/grape_cli/config.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source_root ⇒ Object
readonly
Returns the value of attribute source_root.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(app_name, source_root, options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(app_name, source_root, options = {}) ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 |
# File 'lib/grape_cli/config.rb', line 8 def initialize(app_name, source_root, = {}) @app_name = app_name @options = @source_root = source_root end |
Instance Attribute Details
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
6 7 8 |
# File 'lib/grape_cli/config.rb', line 6 def app_name @app_name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/grape_cli/config.rb', line 6 def @options end |
#source_root ⇒ Object (readonly)
Returns the value of attribute source_root.
6 7 8 |
# File 'lib/grape_cli/config.rb', line 6 def source_root @source_root end |
Instance Method Details
#config ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/grape_cli/config.rb', line 14 def config { source_root: source_root, app_name: app_name, class_name: ClassNameGenerator.new(app_name).generate, database: [:database], database_gem: database_gem, rspec: rspec?, verbose: ApplicationFactory.instance.verbose_output } end |