Class: Eco::API::Policies::Policy
- Inherits:
-
UseCases::UseCase
- Object
- UseCases::BaseCase
- UseCases::UseCase
- Eco::API::Policies::Policy
- Defined in:
- lib/eco/api/policies/policy.rb
Instance Attribute Summary
Attributes inherited from UseCases::UseCase
#name, #options, #times_launched, #type
Instance Method Summary collapse
-
#initialize(name, type: :transform, root:, &block) ⇒ Policy
constructor
A new instance of Policy.
- #root=(value) ⇒ Object
Methods inherited from UseCases::UseCase
Methods inherited from UseCases::BaseCase
Methods included from Common::ClassHelpers
#class_resolver, #descendants, #descendants?, #new_class, #resolve_class, #to_constant
Constructor Details
#initialize(name, type: :transform, root:, &block) ⇒ Policy
Returns a new instance of Policy.
7 8 9 |
# File 'lib/eco/api/policies/policy.rb', line 7 def initialize(name, type: :transform, root:, &block) super(name, type: type, root: root, &block) end |
Instance Method Details
#root=(value) ⇒ Object
11 12 13 14 |
# File 'lib/eco/api/policies/policy.rb', line 11 def root=(value) raise "Root should be a Eco::API::Policies object. Given: #{value}" if !value.is_a?(Eco::API::Policies) @root = value end |