Class: SequelProxy
- Inherits:
- BasicObject
- Defined in:
- lib/cucumber/lib/utils/sequel_utils.rb
Instance Attribute Summary collapse
-
#log ⇒ Object
readonly
Delegate to Sequel except the OERPScenario methods to manage the connections.
Instance Method Summary collapse
-
#initialize(params, log) ⇒ SequelProxy
constructor
A new instance of SequelProxy.
Constructor Details
#initialize(params, log) ⇒ SequelProxy
Returns a new instance of SequelProxy.
50 51 52 53 54 55 56 57 |
# File 'lib/cucumber/lib/utils/sequel_utils.rb', line 50 def initialize(params, log) @log = log @db = ::Sequel.postgres(:host=>params[:db_host], :database=>params[:dbname], :user=>params[:db_user], :password=>params[:db_password], :port => params[:db_port] || 5432) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (protected)
60 61 62 |
# File 'lib/cucumber/lib/utils/sequel_utils.rb', line 60 def method_missing(name, *args, &block) @db.send(name, *args, &block) end |
Instance Attribute Details
#log ⇒ Object (readonly)
Delegate to Sequel except the OERPScenario methods to manage the connections
48 49 50 |
# File 'lib/cucumber/lib/utils/sequel_utils.rb', line 48 def log @log end |