Class: Nokogiri::XML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/showoff/monkeypatches.rb

Instance Method Summary collapse

Instance Method Details

#add_class(classlist) ⇒ Object



17
18
19
# File 'lib/showoff/monkeypatches.rb', line 17

def add_class(classlist)
  self[:class] = [self[:class], classlist].join(' ')
end

#classesObject



23
24
25
# File 'lib/showoff/monkeypatches.rb', line 23

def classes
  self[:class] ? self[:class].split(' ') : []
end