Module: Tracksperanto::Parameters

Included in:
Tool::Base
Defined in:
lib/tracksperanto/parameters.rb

Defined Under Namespace

Classes: Parameter

Instance Method Summary collapse

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, options = {})
  options = {:name => name}.merge(options)
  param = Parameter.new(options)
  parameters.push(param)
  param.apply_to(self)
end

#parametersObject

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