Class: ASPSMS::Request::UnlockOriginator

Inherits:
Abstract
  • Object
show all
Defined in:
lib/aspsms.rb

Instance Attribute Summary collapse

Attributes inherited from Abstract

#password, #userkey

Instance Method Summary collapse

Methods inherited from Abstract

#to_s

Constructor Details

#initialize(cfg) ⇒ UnlockOriginator

Returns a new instance of UnlockOriginator.



241
242
243
244
245
# File 'lib/aspsms.rb', line 241

def initialize(cfg)
  super(cfg)
  @originator = @cfg.originator
  @code = ''
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



240
241
242
# File 'lib/aspsms.rb', line 240

def code
  @code
end

#originatorObject

Returns the value of attribute originator.



240
241
242
# File 'lib/aspsms.rb', line 240

def originator
  @originator
end

Instance Method Details

#each_element {|REXML::Element.new('Originator'). add_text(@cfg.utf8(originator))| ... } ⇒ Object

Yields:

  • (REXML::Element.new('Originator'). add_text(@cfg.utf8(originator)))


247
248
249
250
251
252
# File 'lib/aspsms.rb', line 247

def each_element
  yield REXML::Element.new('Originator').
    add_text(@cfg.utf8(originator))
  yield REXML::Element.new('OriginatorUnlockCode').
    add_text(@cfg.utf8(code))
end