Sha256: 15eafe40d5a0c34949cc059628146ba4a44ff1a2bc6387c781fd10126341e72f

Contents?: true

Size: 376 Bytes

Versions: 1

Compression:

Stored size: 376 Bytes

Contents

module DiviningRod
  class Mappings

    class << self

      attr_accessor :root_definition
      
      def define(opts = {})
        @root_definition = Definition.new { true }
        yield Mapper.new(@root_definition, opts)
        @root_definition.freeze
      end
      
      def evaluate(obj)
        @root_definition.evaluate(obj)
      end
      
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
divining_rod-0.5.0 lib/divining_rod/mappings.rb