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
-
#initialize(args, options) ⇒ Inspect
constructor
A new instance of Inspect.
- #run ⇒ Object
Constructor Details
#initialize(args, options) ⇒ Inspect
Returns a new instance of Inspect.
5 6 7 8 9 10 11 |
# File 'lib/response_mate/commands/inspect.rb', line 5 def initialize(args, ) super(args, ) @options[:manifest] = ResponseMate::Manifest.new([:requests_manifest]) @inspector = ResponseMate::Inspector.new(@options) @history = [] end |
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
13 14 15 16 17 18 19 20 21 |
# File 'lib/response_mate/commands/inspect.rb', line 13 def run 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 |