Exception: UnexpectedInput

Inherits:
StandardError
  • Object
show all
Defined in:
lib/expects/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler) ⇒ UnexpectedInput

Returns a new instance of UnexpectedInput.



4
5
6
7
# File 'lib/expects/error.rb', line 4

def initialize(handler)
  @handler = handler
  @subject, @expected = handler.subject, handler.objects
end

Instance Attribute Details

#expectedObject (readonly)

Returns the value of attribute expected.



2
3
4
# File 'lib/expects/error.rb', line 2

def expected
  @expected
end

#subjectObject (readonly)

Returns the value of attribute subject.



2
3
4
# File 'lib/expects/error.rb', line 2

def subject
  @subject
end

Instance Method Details

#messageObject



9
10
11
# File 'lib/expects/error.rb', line 9

def message
  @message ||= @handler.build_message
end