Exception: PG::URL::Error::MissingParams
- Inherits:
-
StandardError
- Object
- StandardError
- PG::URL::Error::MissingParams
- Defined in:
- lib/pg/url/error.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(params = [], message = String.new) ⇒ MissingParams
constructor
A new instance of MissingParams.
Constructor Details
#initialize(params = [], message = String.new) ⇒ MissingParams
Returns a new instance of MissingParams.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pg/url/error.rb', line 8 def initialize(params = [], = String.new) @params = params case params.length when 1 = .empty? ? 'Missing required connection string parameter' : super("#{}: #{params.first}") else = .empty? ? 'Missing required connection string parameters' : super("#{}: [#{params*', '}].") end end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/pg/url/error.rb', line 7 def params @params end |