Class: MetaBuilder::ParameterGroup
- Inherits:
-
Object
- Object
- MetaBuilder::ParameterGroup
- Defined in:
- lib/MetaBuilder/group.rb
Overview
The ParameterGroup class provides an easy way to group parameters of a described class. The group should have a #name, a #long_name, more descriptive and a description.
Instance Attribute Summary collapse
-
#description ⇒ Object
The (text) description of the group.
-
#long_name ⇒ Object
The long name of the group.
-
#name ⇒ Object
The short name of the group.
-
#parameter_list ⇒ Object
The list of parameters in that group, in the order they were declared.
Instance Method Summary collapse
- #add_parameter(param) ⇒ Object
-
#initialize(name, long_name = name, description = nil) ⇒ ParameterGroup
constructor
A new instance of ParameterGroup.
Constructor Details
#initialize(name, long_name = name, description = nil) ⇒ ParameterGroup
Returns a new instance of ParameterGroup.
43 44 45 46 47 48 49 |
# File 'lib/MetaBuilder/group.rb', line 43 def initialize(name, long_name = name, description = nil) @name = name @description = description @long_name = long_name @parameter_list = [] end |
Instance Attribute Details
#description ⇒ Object
The (text) description of the group
36 37 38 |
# File 'lib/MetaBuilder/group.rb', line 36 def description @description end |
#long_name ⇒ Object
The long name of the group
33 34 35 |
# File 'lib/MetaBuilder/group.rb', line 33 def long_name @long_name end |
#name ⇒ Object
The short name of the group
30 31 32 |
# File 'lib/MetaBuilder/group.rb', line 30 def name @name end |
#parameter_list ⇒ Object
The list of parameters in that group, in the order they were declared.
41 42 43 |
# File 'lib/MetaBuilder/group.rb', line 41 def parameter_list @parameter_list end |
Instance Method Details
#add_parameter(param) ⇒ Object
51 52 53 |
# File 'lib/MetaBuilder/group.rb', line 51 def add_parameter(param) @parameter_list << param end |