Class: CanTango::PermissionEngine::Parser::Categories
- Inherits:
-
Object
- Object
- CanTango::PermissionEngine::Parser::Categories
- Defined in:
- lib/cantango/permission_engine/parser/categories.rb
Instance Method Summary collapse
Instance Method Details
#parse(categories, key, obj) {|categories| ... } ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/cantango/permission_engine/parser/categories.rb', line 6 def parse categories, key, obj, &blk case obj when Array categories[key] = obj else raise "Each key must have a YAML hash that defines which models make up the category (related kinds of items)" end yield categories if blk end |