Class: Pgchief::Command::StoreConnectionString
- Inherits:
-
Object
- Object
- Pgchief::Command::StoreConnectionString
- Defined in:
- lib/pgchief/command/store_connection_string.rb
Overview
Class to store connection string
Instance Attribute Summary collapse
-
#connection_string ⇒ Object
readonly
Returns the value of attribute connection_string.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection_string) ⇒ StoreConnectionString
constructor
A new instance of StoreConnectionString.
Constructor Details
#initialize(connection_string) ⇒ StoreConnectionString
Returns a new instance of StoreConnectionString.
13 14 15 |
# File 'lib/pgchief/command/store_connection_string.rb', line 13 def initialize(connection_string) @connection_string = connection_string end |
Instance Attribute Details
#connection_string ⇒ Object (readonly)
Returns the value of attribute connection_string.
11 12 13 |
# File 'lib/pgchief/command/store_connection_string.rb', line 11 def connection_string @connection_string end |
Class Method Details
.call(connection_string) ⇒ Object
7 8 9 |
# File 'lib/pgchief/command/store_connection_string.rb', line 7 def self.call(connection_string) new(connection_string).call end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 |
# File 'lib/pgchief/command/store_connection_string.rb', line 17 def call File.open(Config.credentials_file, 'a') do |file| file.puts @connection_string end end |