Class: Tufte::Binding::BindingFactory
- Inherits:
-
Object
- Object
- Tufte::Binding::BindingFactory
- Defined in:
- lib/tufte/binding.rb
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(instance_variables:, mod:) ⇒ BindingFactory
constructor
A new instance of BindingFactory.
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_binding ⇒ Object
20 21 22 |
# File 'lib/tufte/binding.rb', line 20 def get_binding binding end |