Class: Bq::Base
- Inherits:
-
Object
- Object
- Bq::Base
- Defined in:
- lib/bq.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(opts = {}) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bq.rb', line 12 def initialize(opts={}) @project_id = opts[:project_id] application_name = opts[:application_name] || "Bq" application_version = opts[:application_version] || "0.0.1" @client = Google::APIClient.new( :application_name => application_name, :application_version => application_version ) self.token = opts[:token] if opts[:token] @bq_client = @client.discovered_api('bigquery', 'v2') end |
Instance Attribute Details
#project_id ⇒ Object
Returns the value of attribute project_id.
10 11 12 |
# File 'lib/bq.rb', line 10 def project_id @project_id end |
#token ⇒ Object
Returns the value of attribute token.
9 10 11 |
# File 'lib/bq.rb', line 9 def token @token end |