Class: Daneel::Room
- Inherits:
-
Object
- Object
- Daneel::Room
- Defined in:
- lib/daneel/room.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id, adapter, data = nil) ⇒ Room
constructor
A new instance of Room.
- #inspect ⇒ Object
- #say(*strings) ⇒ Object
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
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/daneel/room.rb', line 4 def data @data end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/daneel/room.rb', line 3 def id @id end |
Instance Method Details
#inspect ⇒ Object
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 |