Sha256: 4a5e0c61034bd6e6bb0cbfe16a4f16e4bd92fa16d22c433c31f9ae8bb3f8ef84
Contents?: true
Size: 408 Bytes
Versions: 2
Compression:
Stored size: 408 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mobility-0.5.1 | lib/mobility/adapter.rb |
mobility-0.5.0 | lib/mobility/adapter.rb |