Module: DataMapper::Shim
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/data_mapper/shim.rb
Defined Under Namespace
Modules: ClassMethods Classes: Enum, List, OriginalValues
Constant Summary collapse
- RAISE_ON_UNHANDLED_OPTIONS =
true
- BigInt =
Placeholders for DataMapper types
Class.new
- Boolean =
Class.new
- Discriminator =
Class.new
- ParanoidDateTime =
Class.new
- Resource =
Class.new
- Serial =
Class.new
- Text =
Class.new
- Yaml =
Serializable classes
Class.new
- Json =
Class.new
Instance Method Summary collapse
- #attribute_dirty?(attribute) ⇒ Boolean
-
#attribute_get(name) ⇒ Object
Mischellaneous helpers.
- #attribute_set(name, value) ⇒ Object
- #dirty? ⇒ Boolean
- #original_values ⇒ Object
Instance Method Details
#attribute_dirty?(attribute) ⇒ Boolean
66 67 68 |
# File 'lib/data_mapper/shim.rb', line 66 def attribute_dirty?(attribute) changed_attributes.has_key?(attribute.to_s) end |
#attribute_get(name) ⇒ Object
Mischellaneous helpers
58 59 60 |
# File 'lib/data_mapper/shim.rb', line 58 def attribute_get(name) read_attribute(name) end |
#attribute_set(name, value) ⇒ Object
62 63 64 |
# File 'lib/data_mapper/shim.rb', line 62 def attribute_set(name, value) write_attribute(name, value) end |
#original_values ⇒ Object
90 91 92 |
# File 'lib/data_mapper/shim.rb', line 90 def original_values OriginalValues.new(self) end |