Exception: ReSorcery::Error::NonHashAssignError

Inherits:
ReSorceryError
  • Object
show all
Defined in:
lib/re_sorcery/error.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ NonHashAssignError

Returns a new instance of NonHashAssignError.



12
13
14
15
# File 'lib/re_sorcery/error.rb', line 12

def initialize(value)
  super(value)
  @value = value
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/re_sorcery/error.rb', line 17

def message
  "#assign can only be used when the @value is a Hash, but was a(n) #{@value.class}"
end