Module: LazyRecord

Defined in:
lib/lazy_record.rb,
lib/lazy_record/base.rb,
lib/lazy_record/scopes.rb,
lib/lazy_record/methods.rb,
lib/lazy_record/nesting.rb,
lib/lazy_record/version.rb,
lib/lazy_record/relation.rb,
lib/lazy_record/callbacks.rb,
lib/lazy_record/attributes.rb,
lib/lazy_record/base_module.rb,
lib/lazy_record/collections.rb,
lib/lazy_record/validations.rb,
lib/lazy_record/associations.rb,
lib/lazy_record/class_methods.rb,
lib/lazy_record/dynamic_modules.rb

Overview

A collection of convenience methods for adding enhanced constructors, attributes, one-to-many collections, one-to-one associations, scopes, methods, and basic validations. Get a lot done with a little code.

Inherit from LazyRecord::Base or include LazyRecord::BaseModule to unlock the features. The primary use case in mind is a toolkit for designing response objects for web API wrappers. Two other gems in progress that are using LazyRecord for this purpose are pyr(www.github.com/msimonborg/pyr) (Ruby interface for Phone Your Rep, a civic tool), and lapi(www.github.com/msimonborg/lapi), an API wrapper building tool with the goal of easing the construction of simple Ruby API wrappers.

This library’s API draws heavy inspiration from ActiveRecord.

Defined Under Namespace

Modules: Associations, Attributes, BaseModule, Callbacks, ClassMethods, Collections, DynamicModules, Methods, Nesting, Scopes, Validations Classes: Base, Relation

Constant Summary collapse

VERSION =
'0.7.2'