Class: Twi::Mock::Message

Inherits:
Twi::Message show all
Defined in:
lib/twi/mock/message.rb

Instance Attribute Summary

Attributes inherited from Twi::Message

#status

Instance Method Summary collapse

Methods inherited from Twi::Message

#content, #image_urls, media_params_for, #opt_in?, #opt_out?, opt_params_for, params_for, #recipient, #sender, #wallflower, wallflower_params_for

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Twi::Resource

Instance Method Details

#createObject



6
7
8
9
10
# File 'lib/twi/mock/message.rb', line 6

def create
  @id = "SM#{rand}"
  @status = 'delivered'
  # todo rescue and then set @code
end

#idString

Returns unique identifier.

Returns:

  • (String)

    unique identifier



4
# File 'lib/twi/mock/message.rb', line 4

def id = @params[:id]