Class: Diograph::Room

Inherits:
Object
  • Object
show all
Defined in:
lib/diograph/room.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#createdObject (readonly)

Returns the value of attribute created.



5
6
7
# File 'lib/diograph/room.rb', line 5

def created
  @created
end

#dioriesObject (readonly)

Returns the value of attribute diories.



5
6
7
# File 'lib/diograph/room.rb', line 5

def diories
  @diories
end

#modifiedObject (readonly)

Returns the value of attribute modified.



5
6
7
# File 'lib/diograph/room.rb', line 5

def modified
  @modified
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/diograph/room.rb', line 5

def name
  @name
end

#room_idObject (readonly)

Returns the value of attribute room_id.



5
6
7
# File 'lib/diograph/room.rb', line 5

def room_id
  @room_id
end