Class: ZeroClick::Sellers::Allow

Inherits:
Object
  • Object
show all
Defined in:
lib/zeroclick/sellers/contracts.rb

Overview

-- guard results -------------------------------------------------------

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#allowanceObject (readonly)

Returns the value of attribute allowance.



128
129
130
# File 'lib/zeroclick/sellers/contracts.rb', line 128

def allowance
  @allowance
end

#contextObject (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

Returns:

  • (Boolean)


138
# File 'lib/zeroclick/sellers/contracts.rb', line 138

def allow? = true