Sha256: 98ec6d2b453dbc671a52fe6e313f4a252a68332ffadaa239f7f8665030a4272d

Contents?: true

Size: 390 Bytes

Versions: 13

Compression:

Stored size: 390 Bytes

Contents

module DeepCover
  module Analyser::OptionallyCovered
    def optionally_covered
      @optionally_covered ||= Analyser
        .constants.map{|c| Analyser.const_get(c)}
        .select{|klass| klass < Analyser }
        .flat_map do |klass|
          klass.instance_methods(false).map {|m| m.match(/^is_(.*)\?$/); $1 }
        end
        .compact
        .map(&:to_sym)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
deep-cover-0.1.14 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.13 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.12 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.11 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.10 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.9 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.8 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.7 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.6 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.5 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.4 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.3 lib/deep_cover/analyser/optionally_covered.rb
deep-cover-0.1.2 lib/deep_cover/analyser/optionally_covered.rb