Class: Mixin::Generators::Structure
- Inherits:
-
Object
- Object
- Mixin::Generators::Structure
- Defined in:
- lib/fox/interface/thor/mixin/generators/structure.rb
Instance Attribute Summary collapse
- #- params [Hash] with types and names of params arguments= ⇒ Object writeonly
- #- structure type= ⇒ Object writeonly
- #- structure_name [Symbol] from generated ruby code= ⇒ Object writeonly
-
#params ⇒ Object
Returns the value of attribute params.
-
#structure_name ⇒ Object
Returns the value of attribute structure_name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, structure_name, params) ⇒ Structure
constructor
A new instance of Structure.
Constructor Details
#initialize(type, structure_name, params) ⇒ Structure
Returns a new instance of Structure.
27 28 29 30 31 32 33 34 35 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 27 def initialize type, structure_name, params @type = type if @type == :class raise RuntimeException.new("Params for #{structure_name} empty") if params.size == 0 @structure_name, @params = structure_name, params else @structure_name = structure_name end end |
Instance Attribute Details
#- params [Hash] with types and names of params arguments=(value) ⇒ Object (writeonly)
19 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 19 attr_accessor :structure_name, :params, :type |
#- structure type=(value) ⇒ Object (writeonly)
19 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 19 attr_accessor :structure_name, :params, :type |
#- structure_name [Symbol] from generated ruby code=(value) ⇒ Object (writeonly)
19 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 19 attr_accessor :structure_name, :params, :type |
#params ⇒ Object
Returns the value of attribute params.
19 20 21 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 19 def params @params end |
#structure_name ⇒ Object
Returns the value of attribute structure_name.
19 20 21 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 19 def structure_name @structure_name end |
#type ⇒ Object
Returns the value of attribute type.
19 20 21 |
# File 'lib/fox/interface/thor/mixin/generators/structure.rb', line 19 def type @type end |