Class: EntityCopy
- Inherits:
-
Object
- Object
- EntityCopy
- Defined in:
- lib/ObjectModel/AnEntity/EntityCopy.rb
Instance Attribute Summary collapse
-
#back_references ⇒ Object
Returns the value of attribute back_references.
-
#entity_id ⇒ Object
Returns the value of attribute entity_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#om_version ⇒ Object
Returns the value of attribute om_version.
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #[](ivname) ⇒ Object
- #[]=(ivname, value) ⇒ Object
- #deleted! ⇒ Object
- #deleted? ⇒ Boolean
-
#initialize ⇒ EntityCopy
constructor
A new instance of EntityCopy.
- #inspect ⇒ Object
- #moved! ⇒ Object
- #moved? ⇒ Boolean
- #new! ⇒ Object
- #new? ⇒ Boolean
- #to_s ⇒ Object
- #updated! ⇒ Object
- #updated? ⇒ Boolean
Constructor Details
#initialize ⇒ EntityCopy
Returns a new instance of EntityCopy.
4 5 6 7 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 4 def initialize @hash = {} @new, @moved, @deleted, @updated = false, false, false, false end |
Instance Attribute Details
#back_references ⇒ Object
Returns the value of attribute back_references.
2 3 4 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 2 def back_references @back_references end |
#entity_id ⇒ Object
Returns the value of attribute entity_id.
2 3 4 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 2 def entity_id @entity_id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 2 def name @name end |
#om_version ⇒ Object
Returns the value of attribute om_version.
2 3 4 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 2 def om_version @om_version end |
#parent ⇒ Object
Returns the value of attribute parent.
2 3 4 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 2 def parent @parent end |
Instance Method Details
#[](ivname) ⇒ Object
9 10 11 12 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 9 def [] ivname ivname.should!(:=~, /^@.+/) if $debug @hash[ivname] end |
#[]=(ivname, value) ⇒ Object
14 15 16 17 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 14 def []= ivname, value ivname.should!(:=~, /^@.+/) if $debug @hash[ivname] = value end |
#deleted! ⇒ Object
26 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 26 def deleted!; @deleted = true end |
#deleted? ⇒ Boolean
25 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 25 def deleted?; @deleted end |
#inspect ⇒ Object
35 36 37 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 35 def inspect to_s end |
#moved! ⇒ Object
29 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 29 def moved!; @moved = true end |
#moved? ⇒ Boolean
28 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 28 def moved?; @moved end |
#new! ⇒ Object
20 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 20 def new!; @new = true end |
#new? ⇒ Boolean
19 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 19 def new?; @new end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 31 def to_s "#<#EntityCopy: #{name}>" end |
#updated! ⇒ Object
23 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 23 def updated!; @updated = true end |
#updated? ⇒ Boolean
22 |
# File 'lib/ObjectModel/AnEntity/EntityCopy.rb', line 22 def updated?; @updated end |