Class: GramV2Client::Base
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- GramV2Client::Base
- Defined in:
- lib/gram_v2_client/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#to_param ⇒ Object
This is set to enable Configuration change at runtime.
Class Method Details
.password ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/gram_v2_client/base.rb', line 29 def password() if GramV2Client.configuration.password if super.to_s != GramV2Client.configuration.password reload_config end end super end |
.proxy ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/gram_v2_client/base.rb', line 38 def proxy() if GramV2Client.configuration.proxy if super.to_s != URI.parse(GramV2Client.configuration.proxy).to_s reload_config end end super end |
.reload_config ⇒ Object
48 49 50 51 52 53 |
# File 'lib/gram_v2_client/base.rb', line 48 def reload_config self.site= GramV2Client.configuration.site self.user= GramV2Client.configuration.user self.password=GramV2Client.configuration.password self.proxy=GramV2Client.configuration.proxy end |
.site ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/gram_v2_client/base.rb', line 11 def site if GramV2Client.configuration.site if super.to_s != URI.parse(GramV2Client.configuration.site).to_s reload_config end end super end |
.user ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/gram_v2_client/base.rb', line 20 def user() if GramV2Client.configuration.user if super.to_s != GramV2Client.configuration.user reload_config end end super end |
Instance Method Details
#to_param ⇒ Object
This is set to enable Configuration change at runtime.
6 7 8 |
# File 'lib/gram_v2_client/base.rb', line 6 def to_param uuid end |