Class: Flatter::Mapper

Inherits:
Object
  • Object
show all
Extended by:
ActiveSupport::Autoload
Includes:
ActiveModel::Validations, AttributeMethods, Collection, Mapping, ModelName, Mounting, Options, Persistence, Target, Traits, Validation, WriteWithIndifferentAccess
Defined in:
lib/flatter/mapper.rb

Defined Under Namespace

Modules: AttributeMethods, Collection, Mapping, ModelName, Mounting, Options, Persistence, Target, Traits, Validation, WriteWithIndifferentAccess Classes: Factory

Constant Summary

Constants included from Target

Target::NoTargetError

Constants included from Collection

Collection::NonUniqKeysError

Instance Attribute Summary

Attributes included from Target

#factory

Attributes included from Mounting

#mounter, #name

Attributes included from Options

#options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Persistence

#apply, #errors, #run_save!, #run_validations!, #save, #valid?, #with_callbacks

Methods included from AttributeMethods

#method_missing, #mounting, #respond_to_missing?

Methods included from Target

#default_target_class_name, #initialize, #set_target, #set_target!, #target, #target_class, #target_class_name, #target_initialized?

Methods included from Traits

#extend_with, #full_name, #initialize, #method_missing, #mounter!, #respond_to_missing?, #set_traits, #shared_methods, #trait!, #trait?, #trait_names, #traits

Methods included from Mounting

#full_name, #mapping_names, #mappings, #mounting_names, #mountings, #read, #root, #write

Methods included from Mapping

#[], #[]=, #mapping, #mapping_names, #mappings, #read, #writable_mapping_names, #write

Methods included from Options

#initialize

Methods included from ModelName

#model_name

Methods included from Collection

#collection, #collection?, #mapping_names, #mounting_names, #pluralize!, #pluralized?, prepended, #read, #write

Methods included from WriteWithIndifferentAccess

#write

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Flatter::Mapper::AttributeMethods

Class Method Details

.inherited(subclass) ⇒ Object



31
32
33
34
# File 'lib/flatter/mapper.rb', line 31

def self.inherited(subclass)
  subclass.mappings  = mappings.dup
  subclass.mountings = mountings.dup
end

Instance Method Details

#inspectObject



36
37
38
# File 'lib/flatter/mapper.rb', line 36

def inspect
  to_s
end

#to_aryObject



40
41
42
# File 'lib/flatter/mapper.rb', line 40

def to_ary
  nil
end