Module: Rubocop::Cop::TernaryOperator
- Included in:
- MultilineTernaryOperator, NestedTernaryOperator
- Defined in:
- lib/rubocop/cop/ternary_operator.rb
Instance Method Summary collapse
Instance Method Details
#inspect(file, source, tokens, sexp) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/rubocop/cop/ternary_operator.rb', line 6 def inspect(file, source, tokens, sexp) each(:ifop, sexp) do |ifop| if offends?(ifop) add_offence(:convention, all_positions(ifop).first.lineno, ) end end end |