Class: Daneel::Room

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, adapter, data = nil) ⇒ Room

Returns a new instance of Room.



6
7
8
# File 'lib/daneel/room.rb', line 6

def initialize(id, adapter, data = nil)
  @id, @adapter, @data = id, adapter, data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



4
5
6
# File 'lib/daneel/room.rb', line 4

def data
  @data
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/daneel/room.rb', line 3

def id
  @id
end

Instance Method Details

#inspectObject



14
15
16
# File 'lib/daneel/room.rb', line 14

def inspect
  %|#<#{self.class} @id=#{@id.inspect} @adapter=#{@adapter.class}>|
end

#say(*strings) ⇒ Object



10
11
12
# File 'lib/daneel/room.rb', line 10

def say(*strings)
  @adapter.say @id, *strings
end