Sha256: a04b513816207389ae7e8ae3cec4a4cc6069608f3e5689111b4b85da6407afb2
Contents?: true
Size: 912 Bytes
Versions: 2
Compression:
Stored size: 912 Bytes
Contents
module Her # This module is the main element of Her. After creating a Her::API object, # include this module in your models to get a few magic methods defined in them. # # @example # class User # include Her::Model # uses_api $api # end # # @user = User.new(:name => "RĂ©mi") module Model autoload :Base, "her/model/base" autoload :HTTP, "her/model/http" autoload :ORM, "her/model/orm" autoload :Relationships, "her/model/relationships" extend ActiveSupport::Concern # Instance methods include Her::Model::ORM # Class methods included do extend Her::Model::Base extend Her::Model::HTTP extend Her::Model::ORM extend Her::Model::Relationships # Define default settings collection_path "#{self.to_s.downcase.pluralize}" uses_api Her::API.default_api end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
her-0.1.1 | lib/her/model.rb |
her-0.1 | lib/her/model.rb |