Class: Tabloid::Parameter

Inherits:
Object
  • Object
show all
Defined in:
lib/tabloid/parameter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/tabloid/parameter.rb', line 3

def key
  @key
end

#labelObject

Returns the value of attribute label.



3
4
5
# File 'lib/tabloid/parameter.rb', line 3

def label
  @label
end