Class: ActiveInteractor::Context::Runtime
- Defined in:
- lib/active_interactor/context/runtime.rb
Constant Summary
Constants included from Type::HasTypes
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #attributes ⇒ Object
- 
  
    
      #initialize(attributes = {})  ⇒ Runtime 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Runtime. 
Methods inherited from Base
Methods included from AttributeAssignment
Methods included from HasActiveModelErrors
#read_attribute_for_validation
Constructor Details
#initialize(attributes = {}) ⇒ Runtime
Returns a new instance of Runtime.
| 6 7 8 9 | # File 'lib/active_interactor/context/runtime.rb', line 6 def initialize(attributes = {}) super @table = {} end | 
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_id, *arguments) ⇒ Object (private)
| 31 32 33 34 35 36 | # File 'lib/active_interactor/context/runtime.rb', line 31 def method_missing(method_id, *arguments) method_name = method_id[/.*(?==\z)/m] return assignment_method_missing(method_name, *arguments) if method_name read_attribute_value(method_id) end | 
Instance Method Details
#attributes ⇒ Object
| 11 12 13 14 15 16 | # File 'lib/active_interactor/context/runtime.rb', line 11 def attributes clean = attribute_set.attributes.each_with_object({}) do |attribute, result| result[attribute.name] = attribute.value end @table.merge(clean) end |