Module: CSSPool::Visitable

Included in:
CSS::Charset, CSS::Declaration, CSS::ImportRule, CSS::Media, CSS::RuleSet, Node
Defined in:
lib/csspool/visitable.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
# File 'lib/csspool/visitable.rb', line 12

def == other
  return false unless self.class == other.class

  accept Visitors::Comparable.new other
end

#accept(target) ⇒ Object



3
4
5
# File 'lib/csspool/visitable.rb', line 3

def accept target
  target.accept self
end

#to_cssObject Also known as: to_s



7
8
9
# File 'lib/csspool/visitable.rb', line 7

def to_css
  accept Visitors::ToCSS.new
end