Class: Area51::AuthorizationTrigger
- Inherits:
-
Object
- Object
- Area51::AuthorizationTrigger
- Defined in:
- lib/area_51/authorization_trigger.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#default_access ⇒ Object
Returns the value of attribute default_access.
Instance Method Summary collapse
-
#initialize(body, default_access = nil) ⇒ AuthorizationTrigger
constructor
A new instance of AuthorizationTrigger.
Constructor Details
#initialize(body, default_access = nil) ⇒ AuthorizationTrigger
Returns a new instance of AuthorizationTrigger.
6 7 8 9 10 11 12 13 14 |
# File 'lib/area_51/authorization_trigger.rb', line 6 def initialize(body, default_access = nil) @body = body if [:restricted, :unrestricted].include?(default_access) @default_access = default_access else @default_access = :restricted end end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/area_51/authorization_trigger.rb', line 4 def body @body end |
#default_access ⇒ Object
Returns the value of attribute default_access.
3 4 5 |
# File 'lib/area_51/authorization_trigger.rb', line 3 def default_access @default_access end |