Class: RubyYacht::Database
- Inherits:
-
Object
- Object
- RubyYacht::Database
- Defined in:
- lib/ruby_yacht/dsl/database.rb
Overview
This class stores the configuration for a project’s database server.
You can configure a database with RubyYacht::Database::DSL
Defined Under Namespace
Classes: DSL
Instance Attribute Summary collapse
-
#host ⇒ Object
The host that the database server is accessed on.
-
#name ⇒ Object
The name of the database.
-
#password ⇒ Object
The password we use to connect to the database.
-
#username ⇒ Object
The username we use to connect to the database.
Instance Method Summary collapse
-
#local? ⇒ Boolean
Whether the database is running on the same machine as the app servers.
Instance Attribute Details
#host ⇒ Object
The host that the database server is accessed on.
7 8 9 |
# File 'lib/ruby_yacht/dsl/database.rb', line 7 def host @host end |
#name ⇒ Object
The name of the database
10 11 12 |
# File 'lib/ruby_yacht/dsl/database.rb', line 10 def name @name end |
#password ⇒ Object
The password we use to connect to the database
16 17 18 |
# File 'lib/ruby_yacht/dsl/database.rb', line 16 def password @password end |
#username ⇒ Object
The username we use to connect to the database
13 14 15 |
# File 'lib/ruby_yacht/dsl/database.rb', line 13 def username @username end |
Instance Method Details
#local? ⇒ Boolean
Whether the database is running on the same machine as the app servers.
19 20 21 |
# File 'lib/ruby_yacht/dsl/database.rb', line 19 def local? host == 'localhost' end |