Module: Flexirest::Recording::ClassMethods
- Defined in:
- lib/flexirest/recording.rb
Instance Method Summary collapse
Instance Method Details
#record_response(url = nil, response = nil, &block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/flexirest/recording.rb', line 6 def record_response(url = nil, response = nil, &block) if url && response && @record_response @record_response.call(url, response) elsif block @record_response = block end end |
#record_response? ⇒ Boolean
14 15 16 17 |
# File 'lib/flexirest/recording.rb', line 14 def record_response? @record_response ||= nil !!@record_response end |