module Tracksperanto::Parameters

Public Class Methods

included(into) click to toggle source
Calls superclass method
# File lib/tracksperanto/parameters.rb, line 3
def self.included(into)
  into.extend(self)
  super
end

Public Instance Methods

parameter(name, options = {}) click to toggle source

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

# 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
parameters() click to toggle source

Returns the array of the parameters defined for this class

# File lib/tracksperanto/parameters.rb, line 52
def parameters
  @ui_parameters ||= []
  @ui_parameters
end