Class: Tabloid::Parameter
- Inherits:
-
Object
- Object
- Tabloid::Parameter
- Defined in:
- lib/tabloid/parameter.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(key, label = nil) ⇒ Parameter
constructor
A new instance of Parameter.
Constructor Details
#initialize(key, label = nil) ⇒ Parameter
Returns a new instance of Parameter.
4 5 6 7 |
# File 'lib/tabloid/parameter.rb', line 4 def initialize(key, label = nil ) self.key = key self.label = label || humanize(key.to_s) end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/tabloid/parameter.rb', line 3 def key @key end |
#label ⇒ Object
Returns the value of attribute label.
3 4 5 |
# File 'lib/tabloid/parameter.rb', line 3 def label @label end |