Class: KHL::Event
- Inherits:
-
Object
- Object
- KHL::Event
- Defined in:
- lib/khl/event.rb
Instance Attribute Summary collapse
-
#author_id ⇒ Object
Returns the value of attribute author_id.
-
#channel_type ⇒ Object
Returns the value of attribute channel_type.
-
#content ⇒ Object
Returns the value of attribute content.
-
#extra ⇒ Object
Returns the value of attribute extra.
-
#msg_id ⇒ Object
Returns the value of attribute msg_id.
-
#msg_timestamp ⇒ Object
Returns the value of attribute msg_timestamp.
-
#nonce ⇒ Object
Returns the value of attribute nonce.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(params = {}) ⇒ Event
Returns a new instance of Event.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/khl/event.rb', line 10 def initialize(params = {}) params = ActiveSupport::HashWithIndifferentAccess.new(params) @channel_type = params[:channel_type] @type = params[:type] @target_id = params[:target_id] = params[:author_id] @content = params[:content] @msg_id = params[:msg_id] = params[:msg_timestamp] @nonce = params[:nonce] @extra = params[:extra] end |
Instance Attribute Details
#author_id ⇒ Object
Returns the value of attribute author_id.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def end |
#channel_type ⇒ Object
Returns the value of attribute channel_type.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def channel_type @channel_type end |
#content ⇒ Object
Returns the value of attribute content.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def content @content end |
#extra ⇒ Object
Returns the value of attribute extra.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def extra @extra end |
#msg_id ⇒ Object
Returns the value of attribute msg_id.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def msg_id @msg_id end |
#msg_timestamp ⇒ Object
Returns the value of attribute msg_timestamp.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def end |
#nonce ⇒ Object
Returns the value of attribute nonce.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def nonce @nonce end |
#target_id ⇒ Object
Returns the value of attribute target_id.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def target_id @target_id end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/khl/event.rb', line 8 def type @type end |