Sha256: c86476376b216d9f4e30f31b41eb52af8188d83f79d5561b100efae85e7d488c

Contents?: true

Size: 436 Bytes

Versions: 1

Compression:

Stored size: 436 Bytes

Contents

module Mobility
=begin

Provides interface to access attributes across all backends of an instance.

=end
  class Adapter
    # @param [Object] model Instance of model class
    def initialize(model)
      @model = model
    end

    # Fetch backend for an attribute
    # @param [String] attribute Attribute
    def backend_for(attribute)
      @model.send(Backend.method_name(attribute))
    end
  end
  private_constant :Adapter
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mobility-0.6.0 lib/mobility/adapter.rb