Class: ActiveInteractor::Context::Input

Inherits:
Base
  • Object
show all
Defined in:
lib/active_interactor/context/input.rb

Constant Summary

Constants included from Type::DeclerationMethods

Type::DeclerationMethods::Boolean

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, #initialize, method_defined?

Methods included from Type::DeclerationMethods::ClassMethods

#any, #list, #union, #untyped

Constructor Details

This class inherits a constructor from ActiveInteractor::Context::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveInteractor::Context::Base

Class Method Details

.argument(*attribute_args) ⇒ Object



11
12
13
# File 'lib/active_interactor/context/input.rb', line 11

def self.argument(*attribute_args)
  attribute_set.add(*attribute_args)
end

.argument_namesObject



15
16
17
# File 'lib/active_interactor/context/input.rb', line 15

def self.argument_names
  attribute_set.attribute_names
end

.argumentsObject



19
20
21
# File 'lib/active_interactor/context/input.rb', line 19

def self.arguments
  attribute_set.attributes
end

Instance Method Details

#argumentsObject



23
24
25
26
27
# File 'lib/active_interactor/context/input.rb', line 23

def arguments
  attribute_set.attributes.each_with_object({}) do |attribute, result|
    result[attribute.name] = attribute.value
  end
end