Class: RSpec::Core::Invocations::PrintHelp

Inherits:
Struct
  • Object
show all
Defined in:
lib/rspec/core/invocations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hidden_optionsObject

Returns the value of attribute hidden_options

Returns:

  • (Object)

    the current value of hidden_options



80
81
82
# File 'lib/rspec/core/invocations.rb', line 80

def hidden_options
  @hidden_options
end

#parserObject

Returns the value of attribute parser

Returns:

  • (Object)

    the current value of parser



80
81
82
# File 'lib/rspec/core/invocations.rb', line 80

def parser
  @parser
end

Instance Method Details

#call(_options, _err, out) ⇒ Object



81
82
83
84
85
# File 'lib/rspec/core/invocations.rb', line 81

def call(_options, _err, out)
  # Removing the hidden options from the output.
  out.puts parser.to_s.gsub(/^\s+(#{hidden_options.join('|')})\b.*$\n/, '')
  0
end