Class: Line::Bot::Event::Base Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/line/bot/v1/event/base.rb

Overview

Deprecated.

This is deprecated. Please use V2::Webhook::Event instead.

Instance Method Summary collapse

Constructor Details

#initialize(src) ⇒ Base

Returns a new instance of Base.



23
24
25
26
27
# File 'lib/line/bot/v1/event/base.rb', line 23

def initialize(src)
  warn '[DEPRECATION] Webhook models in V1 is deprecated. Please use V2 instead.' unless ENV['SUPRESS_V1_DEPRECATION_WARNINGS']

  @src = src
end

Instance Method Details

#[](key) ⇒ Object



29
30
31
# File 'lib/line/bot/v1/event/base.rb', line 29

def [](key)
  @src[key]
end

#to_hashObject



33
34
35
# File 'lib/line/bot/v1/event/base.rb', line 33

def to_hash
  @src
end