Class: GOM::Object::Draft
- Inherits:
-
Object
- Object
- GOM::Object::Draft
- Defined in:
- lib/gom/object/draft.rb
Overview
A draft for an object
Instance Attribute Summary collapse
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#object_id ⇒ Object
Returns the value of attribute object_id.
- #properties ⇒ Object
- #relations ⇒ Object
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object_id = nil, class_name = nil, properties = { }, relations = { }) ⇒ Draft
constructor
A new instance of Draft.
Constructor Details
#initialize(object_id = nil, class_name = nil, properties = { }, relations = { }) ⇒ Draft
Returns a new instance of Draft.
10 11 12 |
# File 'lib/gom/object/draft.rb', line 10 def initialize(object_id = nil, class_name = nil, properties = { }, relations = { }) @object_id, @class_name, @properties, @relations = object_id, class_name, properties, relations end |
Instance Attribute Details
#class_name ⇒ Object
Returns the value of attribute class_name.
6 7 8 |
# File 'lib/gom/object/draft.rb', line 6 def class_name @class_name end |
#object_id ⇒ Object
Returns the value of attribute object_id.
5 6 7 |
# File 'lib/gom/object/draft.rb', line 5 def object_id @object_id end |
#properties ⇒ Object
14 15 16 |
# File 'lib/gom/object/draft.rb', line 14 def properties @properties || { } end |
#relations ⇒ Object
18 19 20 |
# File 'lib/gom/object/draft.rb', line 18 def relations @relations || { } end |
Instance Method Details
#==(other) ⇒ Object
22 23 24 |
# File 'lib/gom/object/draft.rb', line 22 def ==(other) object_id == other.object_id && class_name == other.class_name && properties == other.properties && relations == other.relations end |