Module: Shape::Renderers

Includes:
DataVisitor
Included in:
Shape
Defined in:
lib/shape/renderers.rb

Instance Method Summary collapse

Methods included from DataVisitor

#visit

Instance Method Details

#as_json(*args) ⇒ Object



5
6
7
# File 'lib/shape/renderers.rb', line 5

def as_json(*args)
  visit(lambda {|x| x.as_json})
end

#to_hash(*args) ⇒ Object Also known as: to_h



9
10
11
# File 'lib/shape/renderers.rb', line 9

def to_hash(*args)
  visit
end