Module: NokogiriStyles::NodeStyles

Included in:
Nokogiri::XML::Node
Defined in:
lib/nokogiri-styles/node_styles.rb

Instance Method Summary collapse

Instance Method Details

#classesObject



13
14
15
# File 'lib/nokogiri-styles/node_styles.rb', line 13

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

#classes=(value) ⇒ Object



17
18
19
# File 'lib/nokogiri-styles/node_styles.rb', line 17

def classes=(value)
  self['class'] = value.join(' ')
end

#stylesObject



5
6
7
# File 'lib/nokogiri-styles/node_styles.rb', line 5

def styles
  return NokogiriStyles::Propset.new(self['style'] || '')
end

#styles=(value) ⇒ Object



9
10
11
# File 'lib/nokogiri-styles/node_styles.rb', line 9

def styles=(value)
  self['style'] = value.to_s
end