Sha256: 8c72ee43c121f6693173ae228e6293192a4a3e234796b1bb937cba94b334ab31

Contents?: true

Size: 290 Bytes

Versions: 7

Compression:

Stored size: 290 Bytes

Contents

require "pluck_map/presenter"

module PluckMap
  class ModelContext
    def initialize(model)
      @model = model
    end

    def define(&block)
      attributes = PluckMap::AttributeBuilder.build(model: @model, &block)
      PluckMap::Presenter.new(@model, attributes)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pluck_map-1.0.0 lib/pluck_map/model_context.rb
pluck_map-1.0.0.rc2 lib/pluck_map/model_context.rb
pluck_map-0.6.2 lib/pluck_map/model_context.rb
pluck_map-1.0.0.rc1 lib/pluck_map/model_context.rb
pluck_map-0.6.1 lib/pluck_map/model_context.rb
pluck_map-0.6.0 lib/pluck_map/model_context.rb
pluck_map-0.5.0 lib/pluck_map/model_context.rb