Class: DbAgile::Command::API
- Inherits:
-
Object
- Object
- DbAgile::Command::API
- Includes:
- Environment::Delegator
- Defined in:
- lib/dbagile/command/api.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Underlying environment.
Instance Method Summary collapse
-
#dataset(name) ⇒ Object
Returns a dataset instance.
-
#dup ⇒ Object
Delegates this api on a environment duplication.
-
#initialize(environment) ⇒ API
constructor
Creates an API instance for a given environment.
Constructor Details
#initialize(environment) ⇒ API
Creates an API instance for a given environment
10 11 12 |
# File 'lib/dbagile/command/api.rb', line 10 def initialize(environment) @environment = environment end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Underlying environment
7 8 9 |
# File 'lib/dbagile/command/api.rb', line 7 def environment @environment end |
Instance Method Details
#dataset(name) ⇒ Object
Returns a dataset instance
19 20 21 22 23 |
# File 'lib/dbagile/command/api.rb', line 19 def dataset(name) environment.with_current_connection{|c| c.dataset(name) } end |