Module: Tracksperanto::Parameters
- Included in:
- Tool::Base
- Defined in:
- lib/tracksperanto/parameters.rb
Defined Under Namespace
Classes: Parameter
Instance Method Summary collapse
-
#parameter(name, options = {}) ⇒ Object
Defines a parameter, options conform to the Parameter class.
-
#parameters ⇒ Object
Returns the array of the parameters defined for this class.
Instance Method Details
#parameter(name, options = {}) ⇒ Object
Defines a parameter, options conform to the Parameter class. The parameter will of course add an attr_accessor to your class for the specified parameter, but it will also
44 45 46 47 48 49 |
# File 'lib/tracksperanto/parameters.rb', line 44 def parameter(name, = {}) = {:name => name}.merge() param = Parameter.new() parameters.push(param) param.apply_to(self) end |
#parameters ⇒ Object
Returns the array of the parameters defined for this class
52 53 54 55 |
# File 'lib/tracksperanto/parameters.rb', line 52 def parameters @ui_parameters ||= [] @ui_parameters end |