Class: Marvel::Api::Request
- Inherits:
-
Object
- Object
- Marvel::Api::Request
- Defined in:
- lib/marvel/api/request.rb
Constant Summary collapse
- GET =
'get'.freeze
Instance Attribute Summary collapse
-
#raw_args ⇒ Object
readonly
Returns the value of attribute raw_args.
-
#raw_options ⇒ Object
readonly
Returns the value of attribute raw_options.
-
#raw_path ⇒ Object
readonly
Returns the value of attribute raw_path.
Instance Method Summary collapse
- #args ⇒ Object
-
#initialize(path:, args: {}, options: {}) ⇒ Request
constructor
A new instance of Request.
- #options ⇒ Object
- #path ⇒ Object
- #server ⇒ Object
- #verb ⇒ Object
Constructor Details
#initialize(path:, args: {}, options: {}) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 |
# File 'lib/marvel/api/request.rb', line 8 def initialize(path:, args: {}, options: {}) @raw_path = path @raw_args = args @raw_options = end |
Instance Attribute Details
#raw_args ⇒ Object (readonly)
Returns the value of attribute raw_args.
4 5 6 |
# File 'lib/marvel/api/request.rb', line 4 def raw_args @raw_args end |
#raw_options ⇒ Object (readonly)
Returns the value of attribute raw_options.
4 5 6 |
# File 'lib/marvel/api/request.rb', line 4 def @raw_options end |
#raw_path ⇒ Object (readonly)
Returns the value of attribute raw_path.
4 5 6 |
# File 'lib/marvel/api/request.rb', line 4 def raw_path @raw_path end |
Instance Method Details
#args ⇒ Object
22 23 24 |
# File 'lib/marvel/api/request.rb', line 22 def args raw_args end |
#options ⇒ Object
26 27 28 |
# File 'lib/marvel/api/request.rb', line 26 def end |
#path ⇒ Object
18 19 20 |
# File 'lib/marvel/api/request.rb', line 18 def path "/v1/public/#{raw_path}" end |
#server ⇒ Object
30 31 32 |
# File 'lib/marvel/api/request.rb', line 30 def server Marvel::Api::DEFAULT_SERVER end |
#verb ⇒ Object
14 15 16 |
# File 'lib/marvel/api/request.rb', line 14 def verb GET end |