Class: Nitpick::Warnings::SimpleWarning

Inherits:
Object
  • Object
show all
Defined in:
lib/nitpick/warnings/simple_warning.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.discover(args = []) ⇒ Object



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

def self.discover(args = [])
  warning = new(*args)
  warning if warning.matches?
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/nitpick/warnings/simple_warning.rb', line 13

def ==(other)
  other.is_a? self.class
end

#matches?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/nitpick/warnings/simple_warning.rb', line 9

def matches?
  false
end

#messageObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/nitpick/warnings/simple_warning.rb', line 17

def message
  raise NotImplementedError
end