Class: BabySMS::Receipt

Inherits:
Object
  • Object
show all
Defined in:
lib/babysms/receipt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message:, adapter:, exceptions:, message_uuid:) ⇒ Receipt

Returns a new instance of Receipt.



8
9
10
11
12
13
# File 'lib/babysms/receipt.rb', line 8

def initialize(message:, adapter:, exceptions:, message_uuid:)
  @message = message
  @adapter = adapter
  @exceptions = exceptions
  @message_uuid = message_uuid
end

Instance Attribute Details

#adapterObject (readonly)

Returns the value of attribute adapter.



4
5
6
# File 'lib/babysms/receipt.rb', line 4

def adapter
  @adapter
end

#exceptionsObject (readonly)

Returns the value of attribute exceptions.



5
6
7
# File 'lib/babysms/receipt.rb', line 5

def exceptions
  @exceptions
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/babysms/receipt.rb', line 3

def message
  @message
end

#message_uuidObject (readonly)

Returns the value of attribute message_uuid.



6
7
8
# File 'lib/babysms/receipt.rb', line 6

def message_uuid
  @message_uuid
end

Instance Method Details

#exceptions?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/babysms/receipt.rb', line 15

def exceptions?
  !exceptions.empty?
end