Class: Fabriq::Skype::Message
- Inherits:
-
Object
- Object
- Fabriq::Skype::Message
- Defined in:
- lib/fabriq/skype/message.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#config ⇒ Object
Returns the value of attribute config.
-
#from_name ⇒ Object
Returns the value of attribute from_name.
-
#room ⇒ Object
Returns the value of attribute room.
Instance Method Summary collapse
- #direct? ⇒ Boolean
-
#initialize(room, body, from_name = "") ⇒ Message
constructor
A new instance of Message.
- #private_session? ⇒ Boolean
Constructor Details
#initialize(room, body, from_name = "") ⇒ Message
Returns a new instance of Message.
7 8 9 10 11 |
# File 'lib/fabriq/skype/message.rb', line 7 def initialize(room, body, from_name = "") @room = room @body = body @from_name = from_name end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/fabriq/skype/message.rb', line 5 def body @body end |
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/fabriq/skype/message.rb', line 5 def config @config end |
#from_name ⇒ Object
Returns the value of attribute from_name.
5 6 7 |
# File 'lib/fabriq/skype/message.rb', line 5 def from_name @from_name end |
#room ⇒ Object
Returns the value of attribute room.
5 6 7 |
# File 'lib/fabriq/skype/message.rb', line 5 def room @room end |
Instance Method Details
#direct? ⇒ Boolean
21 22 23 |
# File 'lib/fabriq/skype/message.rb', line 21 def direct? (self.config.skype_name && self.body.downcase.include?("@#{self.config.skype_name.downcase}")) == true end |
#private_session? ⇒ Boolean
17 18 19 |
# File 'lib/fabriq/skype/message.rb', line 17 def private_session? self.room.private_session? end |