Class: YAPI::Fetcher
- Inherits:
-
Object
- Object
- YAPI::Fetcher
- Defined in:
- lib/yapi/fetcher.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#route_name ⇒ Object
readonly
Returns the value of attribute route_name.
Instance Method Summary collapse
-
#initialize(config, route_name) ⇒ Fetcher
constructor
A new instance of Fetcher.
- #perform ⇒ Object
Constructor Details
#initialize(config, route_name) ⇒ Fetcher
Returns a new instance of Fetcher.
8 9 10 11 |
# File 'lib/yapi/fetcher.rb', line 8 def initialize(config, route_name) @config = config @route_name = route_name end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/yapi/fetcher.rb', line 5 def config @config end |
#route_name ⇒ Object (readonly)
Returns the value of attribute route_name.
6 7 8 |
# File 'lib/yapi/fetcher.rb', line 6 def route_name @route_name end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 |
# File 'lib/yapi/fetcher.rb', line 13 def perform puts "#{request.method.upcase} #{request.url}" puts client.perform(request).to_s(show_headers: config.output_headers?) end |