Sha256: 026da40acd0f287d94dcb7aea40a4c36f264b8655b5ae9532c0c1dcc7df905c8

Contents?: true

Size: 437 Bytes

Versions: 21

Compression:

Stored size: 437 Bytes

Contents

module CanTango
  class PermissionEngine < Engine
    module Parser
      class Categories

        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
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
cantango-0.9.4.7 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.4.6 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.4.5 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.4.3 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.4.2 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.4.1 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.4 lib/cantango/permission_engine/parser/categories.rb
cantango-0.9.3.2 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.9.5 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.9.4 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.9.3 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.9.2 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.9.1 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.9 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.8.1 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.8 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.7 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.6.2 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.6.1 lib/cantango/permission_engine/parser/categories.rb
cantango-0.8.6 lib/cantango/permission_engine/parser/categories.rb