Class: AliDayu::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ali_dayu/base.rb

Direct Known Subclasses

Sms, Voice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/ali_dayu/base.rb', line 8

def initialize(options = {})
  self.app_key = options['app_key'] || AliDayu.app_key
  self.app_secret = options['app_secret'] || AliDayu.app_secret
  self.post_url = options['post_url'] || AliDayu.post_url
end

Instance Attribute Details

#app_keyObject

Returns the value of attribute app_key.



6
7
8
# File 'lib/ali_dayu/base.rb', line 6

def app_key
  @app_key
end

#app_secretObject

Returns the value of attribute app_secret.



6
7
8
# File 'lib/ali_dayu/base.rb', line 6

def app_secret
  @app_secret
end

#post_urlObject

Returns the value of attribute post_url.



6
7
8
# File 'lib/ali_dayu/base.rb', line 6

def post_url
  @post_url
end

Instance Method Details

#deliver(*args) ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/ali_dayu/base.rb', line 14

def deliver(*args)
  raise NotImplementedError, 'crontab must be implemented'
end