Class: ConfValue
Instance Attribute Summary collapse
-
#display_value ⇒ Object
readonly
Returns the value of attribute display_value.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(label, value) ⇒ ConfValue
constructor
A new instance of ConfValue.
- #to_s ⇒ Object
Methods included from Translating
Constructor Details
#initialize(label, value) ⇒ ConfValue
Returns a new instance of ConfValue.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/gui/conf_value.rb', line 38 def initialize(label, value) @label = label @value = value @value ||= '' if(value.respond_to?(:to_ary) ) @display_value = @value.map{|v| trl(v) } else @display_value = trl(value.to_s, false) end end |
Instance Attribute Details
#display_value ⇒ Object (readonly)
Returns the value of attribute display_value.
53 54 55 |
# File 'lib/gui/conf_value.rb', line 53 def display_value @display_value end |
#value ⇒ Object
Returns the value of attribute value.
52 53 54 |
# File 'lib/gui/conf_value.rb', line 52 def value @value end |
Instance Method Details
#to_s ⇒ Object
48 49 50 |
# File 'lib/gui/conf_value.rb', line 48 def to_s self.class.name.dup << ': value = ' << @value.to_s << ', display_value = ' << @display_value.to_s end |