Class: Google::ClientBuilder
- Inherits:
-
Object
- Object
- Google::ClientBuilder
- Extended by:
- ConstructionHelper
- Defined in:
- lib/google/client_builder.rb,
lib/google/client_builder/scopes_helper.rb,
lib/google/client_builder/construction_helper.rb
Defined Under Namespace
Modules: ConstructionHelper Classes: ScopesHelper
Instance Attribute Summary collapse
-
#authorize ⇒ Object
Returns the value of attribute authorize.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#user_email ⇒ Object
Returns the value of attribute user_email.
Class Method Summary collapse
Instance Method Summary collapse
- #authorize! ⇒ Object
- #build ⇒ Object
-
#initialize {|_self| ... } ⇒ ClientBuilder
constructor
A new instance of ClientBuilder.
Methods included from ConstructionHelper
calendar_client, directory_client
Constructor Details
#initialize {|_self| ... } ⇒ ClientBuilder
Returns a new instance of ClientBuilder.
15 16 17 |
# File 'lib/google/client_builder.rb', line 15 def initialize yield(self) if block_given? end |
Instance Attribute Details
#authorize ⇒ Object
Returns the value of attribute authorize.
8 9 10 |
# File 'lib/google/client_builder.rb', line 8 def @authorize end |
#scopes ⇒ Object
Returns the value of attribute scopes.
8 9 10 |
# File 'lib/google/client_builder.rb', line 8 def scopes @scopes end |
#user_email ⇒ Object
Returns the value of attribute user_email.
8 9 10 |
# File 'lib/google/client_builder.rb', line 8 def user_email @user_email end |
Class Method Details
.key ⇒ Object
10 11 12 13 |
# File 'lib/google/client_builder.rb', line 10 def self.key OpenSSL::PKey::RSA.new(ENV.fetch("GOOGLE_API_PRIVATE_KEY").gsub("\\n", "\n"), "notasecret") # static default for Google P12 auth end |
Instance Method Details
#authorize! ⇒ Object
19 20 21 |
# File 'lib/google/client_builder.rb', line 19 def @authorize = true end |