lib/jm/dsl/self_link_builder.rb
# Create a mapper from the settings
Create a mapper from the settings
Create a mapper from the settings
def to_mapper
        if @read || @write
          mapper = BlockMapper.new(@read, @write)
        elsif @mapper
          mapper = @mapper
        else
          raise Exception.new("You have to pass a mapper")
        end
        link_mapper = HAL::LinkMapper.new(@uri_template)
        Mappers::MapperChain.new([mapper, link_mapper])
      end
def to_mapper if @read || @write mapper = BlockMapper . new ( @read , @write ) elsif @mapper mapper = @mapper else raise Exception . new ( "You have to pass a mapper" ) end link_mapper = HAL :: LinkMapper . new ( @uri_template ) Mappers :: MapperChain . new ( [ mapper , link_mapper ] ) end
Create a mapper from the settings
Create a mapper from the settings