Class: ResponseMate::Commands::Inspect
- Defined in:
- lib/response_mate/commands/inspect.rb
Instance Attribute Summary collapse
-
#history ⇒ Object
Returns the value of attribute history.
-
#inspector ⇒ Object
readonly
Returns the value of attribute inspector.
Attributes inherited from Base
Instance Method Summary collapse
-
#run ⇒ Object
rubocop:disable Metrics/AbcSize.
Methods inherited from Base
Constructor Details
This class inherits a constructor from ResponseMate::Commands::Base
Instance Attribute Details
#history ⇒ Object
Returns the value of attribute history.
3 4 5 |
# File 'lib/response_mate/commands/inspect.rb', line 3 def history @history end |
#inspector ⇒ Object (readonly)
Returns the value of attribute inspector.
2 3 4 |
# File 'lib/response_mate/commands/inspect.rb', line 2 def inspector @inspector end |
Instance Method Details
#run ⇒ Object
rubocop:disable Metrics/AbcSize
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/response_mate/commands/inspect.rb', line 5 def run # rubocop:disable Metrics/AbcSize environment = ResponseMate::Environment.new([:environment]) [:manifest] = ResponseMate::Manifest.new([:requests_manifest], environment) @inspector = ResponseMate::Inspector.new() @history = [] if args.empty? return $stderr.puts 'At least one key has to be specified'.red end args.each do |key| inspector.inspect_key(key) end end |