Class: YeSQL::Errors::NoBindingsProvidedError
- Inherits:
-
Object
- Object
- YeSQL::Errors::NoBindingsProvidedError
- Includes:
- Utils::Read
- Defined in:
- lib/yesql/errors/no_bindings_provided_error.rb
Instance Method Summary collapse
-
#initialize(binds, file_path) ⇒ NoBindingsProvidedError
constructor
A new instance of NoBindingsProvidedError.
- #validate_statement_bindings ⇒ Object
Methods included from Utils::Read
Constructor Details
#initialize(binds, file_path) ⇒ NoBindingsProvidedError
Returns a new instance of NoBindingsProvidedError.
10 11 12 13 |
# File 'lib/yesql/errors/no_bindings_provided_error.rb', line 10 def initialize(binds, file_path) @binds = binds @file_path = file_path end |
Instance Method Details
#validate_statement_bindings ⇒ Object
15 16 17 18 19 20 |
# File 'lib/yesql/errors/no_bindings_provided_error.rb', line 15 def validate_statement_bindings return if statement_binds.size.zero? return if expected_binds? raise ::ArgumentError, end |