Class: Tufte::Binding::BindingFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/tufte/binding.rb

Instance Method Summary collapse

Constructor Details

#initialize(instance_variables:, mod:) ⇒ BindingFactory

Returns a new instance of BindingFactory.



11
12
13
14
15
16
17
18
# File 'lib/tufte/binding.rb', line 11

def initialize(instance_variables:, mod:)
  instance_variables.each do |name, value|
    instance_variable_set(name, value)
  end
  mod.singleton_methods.each do |name|
    define_singleton_method(name, &mod.singleton_method(name))
  end
end

Instance Method Details

#get_bindingObject



20
21
22
# File 'lib/tufte/binding.rb', line 20

def get_binding
  binding
end