Class: Hamlizer::AttributesHamlConverter
- Inherits:
-
Object
- Object
- Hamlizer::AttributesHamlConverter
- Defined in:
- lib/hamlizer/attributes_haml_converter.rb
Instance Method Summary collapse
- #haml ⇒ Object
-
#initialize(element) ⇒ AttributesHamlConverter
constructor
A new instance of AttributesHamlConverter.
Constructor Details
#initialize(element) ⇒ AttributesHamlConverter
Returns a new instance of AttributesHamlConverter.
3 4 5 |
# File 'lib/hamlizer/attributes_haml_converter.rb', line 3 def initialize(element) @element = element end |
Instance Method Details
#haml ⇒ Object
7 8 9 |
# File 'lib/hamlizer/attributes_haml_converter.rb', line 7 def haml element.has_attributes? ? (id_haml + class_haml + regular_attributes_haml) : '' end |