Class: Deploio::PgDatabaseRef
- Inherits:
-
Object
- Object
- Deploio::PgDatabaseRef
- Defined in:
- lib/deploio/pg_database_ref.rb
Instance Attribute Summary collapse
-
#database_name ⇒ Object
readonly
Returns the value of attribute database_name.
-
#project_name ⇒ Object
readonly
Returns the value of attribute project_name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #full_name ⇒ Object
-
#initialize(input, available_databases: {}) ⇒ PgDatabaseRef
constructor
The input is given in the format "
- ". - #to_s ⇒ Object
Constructor Details
#initialize(input, available_databases: {}) ⇒ PgDatabaseRef
The input is given in the format "
10 11 12 13 |
# File 'lib/deploio/pg_database_ref.rb', line 10 def initialize(input, available_databases: {}) @input = input.to_s parse_from_available_databases(available_databases) end |
Instance Attribute Details
#database_name ⇒ Object (readonly)
Returns the value of attribute database_name.
7 8 9 |
# File 'lib/deploio/pg_database_ref.rb', line 7 def database_name @database_name end |
#project_name ⇒ Object (readonly)
Returns the value of attribute project_name.
7 8 9 |
# File 'lib/deploio/pg_database_ref.rb', line 7 def project_name @project_name end |
Instance Method Details
#==(other) ⇒ Object
23 24 25 26 27 |
# File 'lib/deploio/pg_database_ref.rb', line 23 def ==(other) return false unless other.is_a?(PgDatabaseRef) project_name == other.project_name && database_name == other.database_name end |
#full_name ⇒ Object
15 16 17 |
# File 'lib/deploio/pg_database_ref.rb', line 15 def full_name "#{project_name}-#{database_name}" end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/deploio/pg_database_ref.rb', line 19 def to_s full_name end |