lib/patience/processable.rb
# Finds area or pile, or card (depends on the option) in
# the areas. If the option is wrong, raises ArgumentError.
Finds area or pile, or card (depends on the option) in
the areas. If the option is wrong, raises ArgumentError.
Finds area or pile or card ( depends on the option ) in the areas . If the option is wrong raises ArgumentError .
def detect_in(areas, option, &block)
      case option
        when :area then find_area_in(areas, &block)
        when :pile then find_pile_in(areas, &block)
        when :card then find_card_in(areas, &block)
      else
        raise ArgumentError, "Unknown option: #{option}"
      end
    end
def detect_in ( areas , option , & block ) case option when :area then find_area_in ( areas , & block ) when :pile then find_pile_in ( areas , & block ) when :card then find_card_in ( areas , & block ) else raise ArgumentError , "Unknown option: #{option}" end end
Finds area or pile, or card (depends on the option) in
the areas.
Finds area or pile or card ( depends on the option ) in the areas .
areas
option
block