Class: PG::AWS_RDS_IAM::ConnectionInfo::KeywordValueString
- Inherits:
-
Object
- Object
- PG::AWS_RDS_IAM::ConnectionInfo::KeywordValueString
- Defined in:
- lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb
Defined Under Namespace
Classes: Parser
Instance Attribute Summary collapse
-
#auth_token_generator_name ⇒ Object
readonly
Returns the value of attribute auth_token_generator_name.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(connection_string) ⇒ KeywordValueString
constructor
A new instance of KeywordValueString.
- #password=(value) ⇒ Object
- #port ⇒ Object
- #to_h ⇒ Object
- #to_s ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(connection_string) ⇒ KeywordValueString
Returns a new instance of KeywordValueString.
9 10 11 12 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 9 def initialize(connection_string) @params = Parser.new(connection_string).parse @auth_token_generator_name = @params.delete(:aws_rds_iam_auth_token_generator) end |
Instance Attribute Details
#auth_token_generator_name ⇒ Object (readonly)
Returns the value of attribute auth_token_generator_name.
7 8 9 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 7 def auth_token_generator_name @auth_token_generator_name end |
Instance Method Details
#host ⇒ Object
18 19 20 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 18 def host @params[:host] end |
#password=(value) ⇒ Object
26 27 28 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 26 def password=(value) @params[:password] = value end |
#port ⇒ Object
22 23 24 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 22 def port @params[:port] end |
#to_h ⇒ Object
34 35 36 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 34 def to_h @params.dup end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 30 def to_s @params.map { |key, value| "#{key}=#{PG::Connection.quote_connstr(value)}" }.join(" ") end |
#user ⇒ Object
14 15 16 |
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 14 def user @params[:user] end |