Class: KHL::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/khl/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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]
  @author_id = params[:author_id]
  @content = params[:content]
  @msg_id = params[:msg_id]
  @msg_timestamp = params[:msg_timestamp]
  @nonce = params[:nonce]
  @extra = params[:extra]
end

Instance Attribute Details

#author_idObject

Returns the value of attribute author_id.



8
9
10
# File 'lib/khl/event.rb', line 8

def author_id
  @author_id
end

#channel_typeObject

Returns the value of attribute channel_type.



8
9
10
# File 'lib/khl/event.rb', line 8

def channel_type
  @channel_type
end

#contentObject

Returns the value of attribute content.



8
9
10
# File 'lib/khl/event.rb', line 8

def content
  @content
end

#extraObject

Returns the value of attribute extra.



8
9
10
# File 'lib/khl/event.rb', line 8

def extra
  @extra
end

#msg_idObject

Returns the value of attribute msg_id.



8
9
10
# File 'lib/khl/event.rb', line 8

def msg_id
  @msg_id
end

#msg_timestampObject

Returns the value of attribute msg_timestamp.



8
9
10
# File 'lib/khl/event.rb', line 8

def msg_timestamp
  @msg_timestamp
end

#nonceObject

Returns the value of attribute nonce.



8
9
10
# File 'lib/khl/event.rb', line 8

def nonce
  @nonce
end

#target_idObject

Returns the value of attribute target_id.



8
9
10
# File 'lib/khl/event.rb', line 8

def target_id
  @target_id
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/khl/event.rb', line 8

def type
  @type
end