Class: DB::Environment
- Inherits:
-
Object
- Object
- DB::Environment
- Defined in:
- lib/db.rb
Instance Method Summary collapse
- #adapter(adapter) ⇒ Object
- #database(datab) ⇒ Object
- #db(db) ⇒ Object
- #host(h) ⇒ Object
-
#initialize(db_type) ⇒ Environment
constructor
A new instance of Environment.
- #password(passwd) ⇒ Object
- #socket(s) ⇒ Object
- #timeout(to) ⇒ Object
- #username(uname) ⇒ Object
Constructor Details
#initialize(db_type) ⇒ Environment
Returns a new instance of Environment.
26 27 28 |
# File 'lib/db.rb', line 26 def initialize db_type @db_type = db_type end |
Instance Method Details
#adapter(adapter) ⇒ Object
29 30 31 32 |
# File 'lib/db.rb', line 29 def adapter adapter # puts "db.#{@db_type}.adapter #{adapter}" puts 'database.yml modification not yet implemented' end |
#database(datab) ⇒ Object
37 38 39 |
# File 'lib/db.rb', line 37 def database datab db datab end |
#db(db) ⇒ Object
33 34 35 36 |
# File 'lib/db.rb', line 33 def db db # puts "db.#{@db_type}.db #{db}" puts 'database.yml modification not yet implemented' end |
#host(h) ⇒ Object
40 41 42 43 |
# File 'lib/db.rb', line 40 def host h # puts "db.#{@db_type}.host #{h}" puts 'database.yml modification not yet implemented' end |
#password(passwd) ⇒ Object
48 49 50 51 |
# File 'lib/db.rb', line 48 def password passwd # puts "db.#{@db_type}.password #{passwd}" puts 'database.yml modification not yet implemented' end |
#socket(s) ⇒ Object
52 53 54 55 |
# File 'lib/db.rb', line 52 def socket s # puts "db.#{@db_type}.socket #{s}" puts 'database.yml modification not yet implemented' end |
#timeout(to) ⇒ Object
56 57 58 59 |
# File 'lib/db.rb', line 56 def timeout to # puts "db.#{@db_type}.timeout #{to}" puts 'database.yml modification not yet implemented' end |
#username(uname) ⇒ Object
44 45 46 47 |
# File 'lib/db.rb', line 44 def username uname # puts "db.#{@db_type}.username #{uname}" puts 'database.yml modification not yet implemented' end |