Class: Hamlizer::AttributesHamlConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/hamlizer/attributes_haml_converter.rb

Instance Method Summary collapse

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

#hamlObject



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