Class: Butterfly::CodeGenerators::GeneratorGroup
- Inherits:
-
Object
- Object
- Butterfly::CodeGenerators::GeneratorGroup
- Defined in:
- lib/butterfly.rb
Overview
a generator-group contains a generator name, its path and its generator-types
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#source ⇒ Object
Returns the value of attribute source.
-
#types ⇒ Object
Returns the value of attribute types.
Instance Method Summary collapse
-
#initialize(file) ⇒ GeneratorGroup
constructor
A new instance of GeneratorGroup.
Constructor Details
#initialize(file) ⇒ GeneratorGroup
Returns a new instance of GeneratorGroup.
85 86 87 88 89 |
# File 'lib/butterfly.rb', line 85 def initialize(file) @name = File.basename(file).gsub(/_generators$/, '') @source = RubiGen::PathSource.new(:app, file) @types = @source.names(:visible) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
83 84 85 |
# File 'lib/butterfly.rb', line 83 def name @name end |
#source ⇒ Object
Returns the value of attribute source.
83 84 85 |
# File 'lib/butterfly.rb', line 83 def source @source end |
#types ⇒ Object
Returns the value of attribute types.
83 84 85 |
# File 'lib/butterfly.rb', line 83 def types @types end |