Class: Nokogiri::XML::Element
- Inherits:
-
Object
- Object
- Nokogiri::XML::Element
- 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 |
#classes ⇒ Object
23 24 25 |
# File 'lib/showoff/monkeypatches.rb', line 23 def classes self[:class] ? self[:class].split(' ') : [] end |