Exception: Samovar::MissingValueError

Inherits:
Error
  • Object
show all
Defined in:
lib/samovar/error.rb

Overview

Raised when a required value is missing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, field) ⇒ MissingValueError

Initialize a new missing value error.



55
56
57
58
59
60
# File 'lib/samovar/error.rb', line 55

def initialize(command, field)
  @command = command
  @field = field
  
  super "#{field} is required"
end

Instance Attribute Details

#commandObject

The command that encountered the error.



65
66
67
# File 'lib/samovar/error.rb', line 65

def command
  @command
end

#fieldObject

The name of the missing field.



70
71
72
# File 'lib/samovar/error.rb', line 70

def field
  @field
end