Class: CanTango::PermissionEngine::Parser::Default
- Defined in:
- lib/cantango/permission_engine/parser/default.rb
Instance Attribute Summary
Attributes inherited from Rule
#action, #method, #model, #target
Instance Method Summary collapse
Methods inherited from Rule
#initialize, #parse_class, #try_class
Constructor Details
This class inherits a constructor from CanTango::PermissionEngine::Parser::Rule
Instance Method Details
#default_all ⇒ Object
11 12 13 |
# File 'lib/cantango/permission_engine/parser/default.rb', line 11 def default_all "#{method}(:#{action}, :all)" end |
#parse ⇒ Object
5 6 7 8 9 |
# File 'lib/cantango/permission_engine/parser/default.rb', line 5 def parse return default_all if target == 'all' parse_class target "#{method}(:#{action}, #{target})" end |