Class: PG::AWS_RDS_IAM::ConnectionInfo::KeywordValueString

Inherits:
Object
  • Object
show all
Defined in:
lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb

Defined Under Namespace

Classes: Parser

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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

#hostObject



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

#portObject



22
23
24
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 22

def port
  @params[:port]
end

#to_hObject



34
35
36
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 34

def to_h
  @params.dup
end

#to_sObject



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

#userObject



14
15
16
# File 'lib/pg/aws_rds_iam/connection_info/keyword_value_string.rb', line 14

def user
  @params[:user]
end