Class: Diograph::Room
- Inherits:
-
Object
- Object
- Diograph::Room
- Defined in:
- lib/diograph/room.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#diories ⇒ Object
readonly
Returns the value of attribute diories.
-
#modified ⇒ Object
readonly
Returns the value of attribute modified.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#room_id ⇒ Object
readonly
Returns the value of attribute room_id.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Room
constructor
A new instance of Room.
Constructor Details
#initialize(args = {}) ⇒ Room
Returns a new instance of Room.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/diograph/room.rb', line 7 def initialize(args={}) # Attributes @room_id = args[:room_id] @name = args[:name] @modified = args[:modified] @created = args[:created] # Relations @diories = args[:diories] || [] end |
Instance Attribute Details
#created ⇒ Object (readonly)
Returns the value of attribute created.
5 6 7 |
# File 'lib/diograph/room.rb', line 5 def created @created end |
#diories ⇒ Object (readonly)
Returns the value of attribute diories.
5 6 7 |
# File 'lib/diograph/room.rb', line 5 def diories @diories end |
#modified ⇒ Object (readonly)
Returns the value of attribute modified.
5 6 7 |
# File 'lib/diograph/room.rb', line 5 def modified @modified end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/diograph/room.rb', line 5 def name @name end |
#room_id ⇒ Object (readonly)
Returns the value of attribute room_id.
5 6 7 |
# File 'lib/diograph/room.rb', line 5 def room_id @room_id end |