Module: Hoygancop::Rules::SimpleRule

Included in:
Ayudenme, StartsWithHoygan, TooMuchMarks
Defined in:
lib/hoygancop/rules/simple_rule.rb

Instance Method Summary collapse

Instance Method Details

#hoygan?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/hoygancop/rules/simple_rule.rb', line 10

def hoygan?
  @text != correct
end

#initialize(text) ⇒ Object



6
7
8
# File 'lib/hoygancop/rules/simple_rule.rb', line 6

def initialize(text)
  @text = text
end

#reportObject



14
15
16
17
# File 'lib/hoygancop/rules/simple_rule.rb', line 14

def report
  class_name = Hoygancop::Support.demodulize self.class.name
  hoygan? ? [Hoygancop::Support.underscore(class_name).to_sym] : []
end