Class: FlatMap::EmptyMapper
- Inherits:
-
BaseMapper
- Object
- BaseMapper
- FlatMap::EmptyMapper
- Defined in:
- lib/flat_map/empty_mapper.rb
Overview
Instance Attribute Summary
Attributes inherited from BaseMapper
#host, #name, #owner, #suffix, #traits
Instance Method Summary collapse
-
#initialize(*traits) ⇒ EmptyMapper
constructor
Initializes
mapperwithtraits, which are used to fetch proper list of mounted mappers. -
#save_target ⇒ true
Return
truesince there’s no target.
Methods inherited from BaseMapper
#hosted?, inherited, #inspect, #owned?, #suffixed?
Methods included from BaseMapper::Skipping
#save, #shallow_save, #skip!, #skipped?, #use!, #valid?, #write
Methods included from BaseMapper::Persistence
#apply, #errors, #save, #shallow_save, #valid?, #write
Methods included from BaseMapper::AttributeMethods
Methods included from BaseMapper::Traits
#extension, #extension?, #mountings, #self_mountings, #trait
Methods included from BaseMapper::Mounting
#after_save_mountings, #before_save_mountings, #method_missing, #mounting, #mountings, #nearest_mountings, #read, #write
Methods included from BaseMapper::Mapping
#[], #[]=, #mapping, #read, #write
Constructor Details
#initialize(*traits) ⇒ EmptyMapper
Initializes mapper with traits, which are used to fetch proper list of mounted mappers.
14 15 16 17 18 19 20 |
# File 'lib/flat_map/empty_mapper.rb', line 14 def initialize(*traits) @traits = traits if block_given? singleton_class.trait :extension, &Proc.new end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FlatMap::BaseMapper::AttributeMethods
Instance Method Details
#save_target ⇒ true
Return true since there’s no target.
25 26 27 |
# File 'lib/flat_map/empty_mapper.rb', line 25 def save_target true end |