Class: Gutsy::Cli::Generator::State
- Inherits:
-
Object
- Object
- Gutsy::Cli::Generator::State
- Defined in:
- lib/gutsy/generator.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
-
#resources ⇒ Object
Returns the value of attribute resources.
Instance Method Summary collapse
- #copyright_owner ⇒ Object
- #copyright_year ⇒ Object
- #gem_name ⇒ Object
- #gem_name_pascal ⇒ Object
- #gem_name_snake ⇒ Object
-
#initialize(app_name, resources = []) ⇒ State
constructor
A new instance of State.
- #twine ⇒ Object
Constructor Details
#initialize(app_name, resources = []) ⇒ State
Returns a new instance of State.
10 11 12 13 |
# File 'lib/gutsy/generator.rb', line 10 def initialize(app_name, resources=[]) @app_name = app_name @resources = resources end |
Instance Attribute Details
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
7 8 9 |
# File 'lib/gutsy/generator.rb', line 7 def app_name @app_name end |
#resources ⇒ Object
Returns the value of attribute resources.
8 9 10 |
# File 'lib/gutsy/generator.rb', line 8 def resources @resources end |
Instance Method Details
#copyright_owner ⇒ Object
31 32 33 |
# File 'lib/gutsy/generator.rb', line 31 def copyright_owner @copyright_owner ||= "YOUR_NAME_HERE" end |
#copyright_year ⇒ Object
27 28 29 |
# File 'lib/gutsy/generator.rb', line 27 def copyright_year @copyright_year ||= Time.now.year end |
#gem_name ⇒ Object
15 16 17 |
# File 'lib/gutsy/generator.rb', line 15 def gem_name @gem_name_snake ||= "#{app_name.underscore}_client" end |
#gem_name_pascal ⇒ Object
23 24 25 |
# File 'lib/gutsy/generator.rb', line 23 def gem_name_pascal @gem_name_pascal ||= gem_name.camelize(:upper) end |
#gem_name_snake ⇒ Object
19 20 21 |
# File 'lib/gutsy/generator.rb', line 19 def gem_name_snake gem_name end |
#twine ⇒ Object
35 36 37 |
# File 'lib/gutsy/generator.rb', line 35 def twine binding end |