Class: ZeroClick::Sellers::Allow
- Inherits:
-
Object
- Object
- ZeroClick::Sellers::Allow
- Defined in:
- lib/zeroclick/sellers/contracts.rb
Overview
-- guard results -------------------------------------------------------
Instance Attribute Summary collapse
-
#allowance ⇒ Object
readonly
Returns the value of attribute allowance.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #allow? ⇒ Boolean
-
#initialize(context, allowance) ⇒ Allow
constructor
allowanceis "allowed", "unavailable" or "not_required" — how the decision was reached, which matters when the outage policy is fail-open.
Constructor Details
#initialize(context, allowance) ⇒ Allow
allowance is "allowed", "unavailable" or "not_required" — how the
decision was reached, which matters when the outage policy is fail-open.
132 133 134 135 136 |
# File 'lib/zeroclick/sellers/contracts.rb', line 132 def initialize(context, allowance) @context = context @allowance = allowance freeze end |
Instance Attribute Details
#allowance ⇒ Object (readonly)
Returns the value of attribute allowance.
128 129 130 |
# File 'lib/zeroclick/sellers/contracts.rb', line 128 def allowance @allowance end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
128 129 130 |
# File 'lib/zeroclick/sellers/contracts.rb', line 128 def context @context end |
Instance Method Details
#allow? ⇒ Boolean
138 |
# File 'lib/zeroclick/sellers/contracts.rb', line 138 def allow? = true |