Module: Morpheus

Defined in:
lib/morpheus.rb,
lib/morpheus/base.rb,
lib/morpheus/client.rb,
lib/morpheus/errors.rb,
lib/morpheus/filter.rb,
lib/morpheus/mixins.rb,
lib/morpheus/request.rb,
lib/morpheus/version.rb,
lib/morpheus/relation.rb,
lib/morpheus/response.rb,
lib/morpheus/reflection.rb,
lib/morpheus/type_caster.rb,
lib/morpheus/url_builder.rb,
lib/morpheus/configuration.rb,
lib/morpheus/request_cache.rb,
lib/morpheus/request_queue.rb,
lib/morpheus/client/railtie.rb,
lib/morpheus/mixins/finders.rb,
lib/morpheus/response_parser.rb,
lib/morpheus/mixins/filtering.rb,
lib/morpheus/mixins/attributes.rb,
lib/morpheus/mixins/conversion.rb,
lib/morpheus/mixins/persistence.rb,
lib/morpheus/mixins/reflections.rb,
lib/morpheus/mixins/url_support.rb,
lib/morpheus/client/associations.rb,
lib/morpheus/mixins/associations.rb,
lib/morpheus/mixins/introspection.rb,
lib/morpheus/client/log_subscriber.rb,
lib/morpheus/mixins/request_handling.rb,
lib/morpheus/mixins/response_parsing.rb,
lib/morpheus/client/request_formatter.rb,
lib/morpheus/client/cached_request_formatter.rb,
lib/morpheus/mixins/associations/association.rb,
lib/morpheus/client/uncached_request_formatter.rb,
lib/morpheus/mixins/associations/has_one_association.rb,
lib/morpheus/mixins/associations/has_many_association.rb,
lib/morpheus/mixins/associations/belongs_to_association.rb

Overview

The Association class serves as the basis for associating resources. Resources have an association DSL that follows that of ActiveRecord:

has_many :automobiles

has_one :car

belongs_to :car_club

This class acts as a proxy that will allow for lazy evaluation of an association. The proxy waits to make the request for the object until a method on the association is called. When this happens, because the method does not exist on the proxy object, method_missing will be called, the target object will be loaded, and then the method will be called on the loaded target.

Defined Under Namespace

Modules: Client, Configuration, Mixins, TypeCaster, UrlBuilder Classes: Base, ConfigurationError, Filter, InvalidResponseCode, NetConnectNotAllowedError, Reflection, Relation, RemoteHostConnectionFailure, Request, RequestCache, RequestQueue, ResourceNotFound, Response, ResponseParser, ServerError, UnrecognizedTypeCastClass

Constant Summary collapse

VERSION =
'0.5.0'