Exception: Samovar::MissingValueError
- Defined in:
- lib/samovar/error.rb
Overview
Raised when a required value is missing.
Instance Attribute Summary collapse
-
#command ⇒ Object
The command that encountered the error.
-
#field ⇒ Object
The name of the missing field.
Instance Method Summary collapse
-
#initialize(command, field) ⇒ MissingValueError
constructor
Initialize a new missing value error.
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
#command ⇒ Object
The command that encountered the error.
65 66 67 |
# File 'lib/samovar/error.rb', line 65 def command @command end |
#field ⇒ Object
The name of the missing field.
70 71 72 |
# File 'lib/samovar/error.rb', line 70 def field @field end |