Class: XwotDiscovery::Message
- Inherits:
-
Object
- Object
- XwotDiscovery::Message
- Defined in:
- lib/xwot_discovery/message.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#hostname ⇒ Object
readonly
Returns the value of attribute hostname.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#protocol ⇒ Object
readonly
Returns the value of attribute protocol.
-
#urn ⇒ Object
readonly
Returns the value of attribute urn.
Instance Method Summary collapse
-
#initialize(a_hash) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(a_hash) ⇒ Message
Returns a new instance of Message.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/xwot_discovery/message.rb', line 8 def initialize(a_hash) @method = a_hash[:method] @location = a_hash[:location] @content_type = a_hash[:content_type] @payload = a_hash[:payload] @protocol = a_hash[:protocol] || '' @urn = a_hash[:urn] @host = a_hash[:host] @hostname = a_hash[:hostname] end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def content_type @content_type end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def host @host end |
#hostname ⇒ Object (readonly)
Returns the value of attribute hostname.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def hostname @hostname end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def location @location end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def method @method end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def payload @payload end |
#protocol ⇒ Object (readonly)
Returns the value of attribute protocol.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def protocol @protocol end |
#urn ⇒ Object (readonly)
Returns the value of attribute urn.
5 6 7 |
# File 'lib/xwot_discovery/message.rb', line 5 def urn @urn end |