Exception: ToiletTracker::Core::InvalidMessageFormat

Inherits:
ParseError
  • Object
show all
Defined in:
lib/toilet_tracker/core/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message_content, expected_format = nil) ⇒ InvalidMessageFormat

Returns a new instance of InvalidMessageFormat.



12
13
14
15
16
# File 'lib/toilet_tracker/core/errors.rb', line 12

def initialize(message_content, expected_format = nil)
  @message_content = message_content
  @expected_format = expected_format
  super(build_error_message)
end

Instance Attribute Details

#expected_formatObject (readonly)

Returns the value of attribute expected_format.



10
11
12
# File 'lib/toilet_tracker/core/errors.rb', line 10

def expected_format
  @expected_format
end

#message_contentObject (readonly)

Returns the value of attribute message_content.



10
11
12
# File 'lib/toilet_tracker/core/errors.rb', line 10

def message_content
  @message_content
end