Class: Pippi::Checks::StripFollowedByEmpty

Inherits:
Check
  • Object
show all
Defined in:
lib/pippi/checks/strip_followed_by_empty.rb

Overview

This is a Rails-only check; how to call it out as such? Putting it in a “rails” checkset for now

Defined Under Namespace

Classes: Documentation

Instance Attribute Summary

Attributes inherited from Check

#ctx

Instance Method Summary collapse

Methods inherited from Check

#add_problem, #clear_fault, #clear_fault_proc, #its_ok_watcher_proc, #method_names_that_indicate_this_is_being_used_as_a_collection, #mutator_methods

Constructor Details

#initialize(ctx) ⇒ StripFollowedByEmpty

Returns a new instance of StripFollowedByEmpty.


11
12
13
14
# File 'lib/pippi/checks/strip_followed_by_empty.rb', line 11

def initialize(ctx)
  super
  @mycheck = MethodSequenceChecker.new(self, String, "strip", "empty?", MethodSequenceChecker::ARITY_TYPE_NONE, MethodSequenceChecker::ARITY_TYPE_NONE, true)
end

Instance Method Details

#decorateObject


7
8
9
# File 'lib/pippi/checks/strip_followed_by_empty.rb', line 7

def decorate
  @mycheck.decorate
end