Class: Gutsy::Cli::Generator::State

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (readonly)

Returns the value of attribute app_name.



7
8
9
# File 'lib/gutsy/generator.rb', line 7

def app_name
  @app_name
end

#resourcesObject

Returns the value of attribute resources.



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

def resources
  @resources
end

Instance Method Details



31
32
33
# File 'lib/gutsy/generator.rb', line 31

def copyright_owner
  @copyright_owner ||= "YOUR_NAME_HERE"
end


27
28
29
# File 'lib/gutsy/generator.rb', line 27

def copyright_year
  @copyright_year ||= Time.now.year
end

#gem_nameObject



15
16
17
# File 'lib/gutsy/generator.rb', line 15

def gem_name
  @gem_name_snake ||= "#{app_name.underscore}_client"
end

#gem_name_pascalObject



23
24
25
# File 'lib/gutsy/generator.rb', line 23

def gem_name_pascal
  @gem_name_pascal ||= gem_name.camelize(:upper)
end

#gem_name_snakeObject



19
20
21
# File 'lib/gutsy/generator.rb', line 19

def gem_name_snake
  gem_name
end

#twineObject



35
36
37
# File 'lib/gutsy/generator.rb', line 35

def twine
  binding
end