Module: Roglew::BaseContextModule::ClassMethods
- Defined in:
- lib/roglew/contexts/base.rb
Instance Method Summary collapse
Instance Method Details
#deferred_module(mod) ⇒ Object
10 11 12 13 |
# File 'lib/roglew/contexts/base.rb', line 10 def deferred_module(mod) raise ArgumentError, 'not a module' unless mod.is_a?(Module) @deferred_mod = mod end |
#immediate_module(mod) ⇒ Object
5 6 7 8 |
# File 'lib/roglew/contexts/base.rb', line 5 def immediate_module(mod) raise ArgumentError, 'not a module' unless mod.is_a?(Module) @immediate_mod = mod end |
#make_calls(target, *names) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/roglew/contexts/base.rb', line 15 def make_calls(target, *names) names.map(&:to_sym).each do |name| define_method(name) { |*args| make_call(target, name, *args) } protected name end end |