Class: Manacle::Proxy::Templates::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/manacle/proxy/templates.rb

Instance Method Summary collapse

Constructor Details

#initializeFactory

Returns a new instance of Factory.



11
12
13
# File 'lib/manacle/proxy/templates.rb', line 11

def initialize
  @factory = Manacle::Proxy::Template::Factory.new
end

Instance Method Details

#build(obj) ⇒ Object



15
16
17
18
19
20
# File 'lib/manacle/proxy/templates.rb', line 15

def build(obj)
  matcher = Punchout::Matcher::Klass.new(obj.class)
  built = @factory.build(obj)

  Punchout::Puncher::Matchable.new(matcher, built)
end