Class: BooleanAttribute
- Defined in:
- lib/white_gold/convention/theme/boolean_attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, value) ⇒ BooleanAttribute
constructor
A new instance of BooleanAttribute.
- #to_theme ⇒ Object
Constructor Details
#initialize(name, value) ⇒ BooleanAttribute
Returns a new instance of BooleanAttribute.
2 3 4 5 |
# File 'lib/white_gold/convention/theme/boolean_attribute.rb', line 2 def initialize name, value @name = name @value = value[0] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/white_gold/convention/theme/boolean_attribute.rb', line 7 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/white_gold/convention/theme/boolean_attribute.rb', line 8 def value @value end |
Instance Method Details
#to_theme ⇒ Object
10 11 12 |
# File 'lib/white_gold/convention/theme/boolean_attribute.rb', line 10 def to_theme "#{name} = #{value};" end |