Module: PolySSH::Visitable

Included in:
NodeEntry, NodeList
Defined in:
lib/polyssh/visitor_pattern.rb

Instance Method Summary collapse

Instance Method Details

#accept(visitor) ⇒ Object



10
11
12
13
# File 'lib/polyssh/visitor_pattern.rb', line 10

def accept visitor
  class_name = self.class.name.gsub('::','_').downcase
  visitor.send 'visit_' + class_name, self
end