Class: ShortcutRuby::Shortcut
- Inherits:
-
Object
- Object
- ShortcutRuby::Shortcut
- Includes:
- PathBuilder
- Defined in:
- lib/shortcut_ruby.rb
Instance Attribute Summary collapse
-
#response_format ⇒ Object
Returns the value of attribute response_format.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, response_format: :json) ⇒ Shortcut
constructor
This is the basic object to interact with the shortcut api.
Methods included from PathBuilder
#clear_path, included, #method_missing, #respond_to_missing?
Constructor Details
#initialize(token, response_format: :json) ⇒ Shortcut
This is the basic object to interact with the shortcut api. An api token is required, and optionally the response format can be set.
15 16 17 18 19 20 |
# File 'lib/shortcut_ruby.rb', line 15 def initialize(token, response_format: :json) raise ArgumentError unless input_valid?(token, response_format) self.token = token self.response_format = response_format end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShortcutRuby::PathBuilder
Instance Attribute Details
#response_format ⇒ Object
Returns the value of attribute response_format.
10 11 12 |
# File 'lib/shortcut_ruby.rb', line 10 def response_format @response_format end |
#token ⇒ Object
Returns the value of attribute token.
10 11 12 |
# File 'lib/shortcut_ruby.rb', line 10 def token @token end |