Module: Setsuzoku::HasConfigContext
- Extended by:
- T::Helpers, T::Sig
- Included in:
- ApiStrategy, AuthStrategy
- Defined in:
- lib/setsuzoku/has_config_context.rb
Overview
Set of methods/functionality for managing a classes config_context
Instance Attribute Summary collapse
-
#config_context ⇒ Object
Returns the value of attribute config_context.
Instance Method Summary collapse
-
#get_from_context(method) ⇒ Any
Retrieve a value from config_context or call the default method implementation for the class.
Instance Attribute Details
#config_context ⇒ Object
Returns the value of attribute config_context.
10 11 12 |
# File 'lib/setsuzoku/has_config_context.rb', line 10 def config_context @config_context end |
Instance Method Details
#get_from_context(method) ⇒ Any
Retrieve a value from config_context or call the default method implementation for the class.
19 20 21 22 23 24 25 |
# File 'lib/setsuzoku/has_config_context.rb', line 19 def get_from_context(method) if self.config_context.key?(method) self.get_registered_instance_val(method) else self.send(method) if self.respond_to?(method) end end |