Exception: RedBlocks::DomainError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/red_blocks/domain_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, domain) ⇒ DomainError

Returns a new instance of DomainError.



3
4
5
6
# File 'lib/red_blocks/domain_error.rb', line 3

def initialize(value, domain)
  @value = value
  @domain = domain
end

Instance Method Details

#messageObject



8
9
10
# File 'lib/red_blocks/domain_error.rb', line 8

def message
  "Input `#{@value.inspect}` is out of the domain `#{@domain.inspect}`"
end