Class: RongCloud::Client
- Inherits:
-
Object
- Object
- RongCloud::Client
- Extended by:
- Forwardable
- Defined in:
- lib/rongcloud/client.rb
Instance Attribute Summary collapse
-
#app_key ⇒ Object
readonly
Returns the value of attribute app_key.
-
#app_secret ⇒ Object
readonly
Returns the value of attribute app_secret.
Instance Method Summary collapse
- #api ⇒ Object
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 15 16 17 |
# File 'lib/rongcloud/client.rb', line 9 def initialize() @app_key = .fetch(:app_key) @app_secret = .fetch(:app_secret) @http = Http.new( self, host: .fetch(:host), options: [:http] || {} ) end |
Instance Attribute Details
#app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
5 6 7 |
# File 'lib/rongcloud/client.rb', line 5 def app_key @app_key end |
#app_secret ⇒ Object (readonly)
Returns the value of attribute app_secret.
5 6 7 |
# File 'lib/rongcloud/client.rb', line 5 def app_secret @app_secret end |
Instance Method Details
#api ⇒ Object
19 20 21 22 23 |
# File 'lib/rongcloud/client.rb', line 19 def api @api ||= Struct.new(:client) do include ::RongCloud::API end.new(self) end |