Class: CanTango::PermissionEngine::Statements
- Inherits:
-
Object
- Object
- CanTango::PermissionEngine::Statements
- Defined in:
- lib/cantango/permission_engine/statements.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Instance Method Summary collapse
-
#initialize(method, action, targets) ⇒ Statements
constructor
A new instance of Statements.
- #to_code ⇒ Object
Constructor Details
#initialize(method, action, targets) ⇒ Statements
Returns a new instance of Statements.
6 7 8 9 10 |
# File 'lib/cantango/permission_engine/statements.rb', line 6 def initialize method, action, targets @method = method @action = action @targets = targets end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
4 5 6 |
# File 'lib/cantango/permission_engine/statements.rb', line 4 def action @action end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
4 5 6 |
# File 'lib/cantango/permission_engine/statements.rb', line 4 def method @method end |
Instance Method Details
#to_code ⇒ Object
12 13 14 |
# File 'lib/cantango/permission_engine/statements.rb', line 12 def to_code parse_statements.join("\n") end |