Sha256: d726927733da7eb1b832912874fe86275ea7725ab300693ef5dcf17f5f27a861

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cantango-permits-0.1.1 lib/cantango/permits_ext/parser/categories.rb