Class: Pippi::Checks::ReverseFollowedByEach

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

Defined Under Namespace

Modules: MyEach, MyReverse Classes: Documentation

Instance Attribute Summary

Attributes inherited from Check

#ctx

Instance Method Summary collapse

Methods inherited from Check

#add_problem, #array_mutator_methods, #clear_fault, #clear_fault_proc, #initialize, #its_ok_watcher_proc, #method_names_that_indicate_this_is_being_used_as_a_collection

Constructor Details

This class inherits a constructor from Pippi::Checks::Check

Instance Method Details

#decorateObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/pippi/checks/reverse_followed_by_each.rb', line 25

def decorate
  Array.class_exec(self) do |my_check|
    # How to do this without a class instance variable?
    @_pippi_check_reverse_followed_by_each = my_check
    class << self
      attr_reader :_pippi_check_reverse_followed_by_each
    end
  end
  Array.prepend MyReverse
end