Class: Nitpick::Warnings::UnusedArgument

Inherits:
SimpleWarning show all
Defined in:
lib/nitpick/warnings/unused_argument.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SimpleWarning

discover, #matches?

Constructor Details

#initialize(arg) ⇒ UnusedArgument

Returns a new instance of UnusedArgument.



6
7
8
# File 'lib/nitpick/warnings/unused_argument.rb', line 6

def initialize(arg)
  @argument = arg
end

Instance Attribute Details

#argumentObject (readonly)

Returns the value of attribute argument.



4
5
6
# File 'lib/nitpick/warnings/unused_argument.rb', line 4

def argument
  @argument
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/nitpick/warnings/unused_argument.rb', line 10

def ==(other)
  @argument == other.argument
end

#messageObject



14
15
16
# File 'lib/nitpick/warnings/unused_argument.rb', line 14

def message
  "The argument #{@argument.inspect} is unused."
end