Class: Pippi::Checks::SelectFollowedByNone

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

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) ⇒ SelectFollowedByNone

Returns a new instance of SelectFollowedByNone.



9
10
11
12
# File 'lib/pippi/checks/select_followed_by_none.rb', line 9

def initialize(ctx)
  super
  @mycheck = MethodSequenceChecker.new(self, Array, "select", "none?", MethodSequenceChecker::ARITY_TYPE_BLOCK_ARG, MethodSequenceChecker::ARITY_TYPE_NONE, true)
end

Instance Method Details

#decorateObject



5
6
7
# File 'lib/pippi/checks/select_followed_by_none.rb', line 5

def decorate
  @mycheck.decorate
end