Sha256: f53c06c8cfc12c54e4ee1e4018a3a3d200051438fab27d32d4a8dbb07a75331e

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

module CanTango
  module PermissionEngine
    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

1 entries across 1 versions & 1 rubygems

Version Path
cantango-0.8.0 lib/cantango/permission_engine/parser/categories.rb