Class: Smess::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/smess/output.rb

Direct Known Subclasses

Auto, Clickatell, HttpBase, Ipx, Mblox, Test, Twilio

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Output

Returns a new instance of Output.



7
8
9
10
# File 'lib/smess/output.rb', line 7

def initialize(config)
  @config = config
  validate_config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/smess/output.rb', line 5

def config
  @config
end

#smsObject

Returns the value of attribute sms.



4
5
6
# File 'lib/smess/output.rb', line 4

def sms
  @sms
end

Instance Method Details

#deliverObject

entry point to the sms delivery process.

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/smess/output.rb', line 18

def deliver
  raise NotImplementedError.new("You must define deliver in your Smess output class")
end

#validate_configObject

should be used to make a reasonable validation that the configuration provided is good.

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/smess/output.rb', line 13

def validate_config
  raise NotImplementedError.new("You must define validate_config in your Smess output class")
end