Sha256: e7c4dcbddc2c727ad1872eae5cab2efeef623f299c73b1c9e11a11477a2d0fba

Contents?: true

Size: 493 Bytes

Versions: 24

Compression:

Stored size: 493 Bytes

Contents

module DRG
  class Judge
    attr_reader :spec, :file

    def initialize(file, spec)
      @file, @spec = file, spec
    end

    def missing_methods
      describes = DRG::Scanner.new(spec).describes
      DRG::Scanner.new(file).methods.select { |method_name|
        describes.detect { |describe_name|
          # turn Report.name or Report#name into .name and #name
          describe_name[/#{Regexp.escape(method_name.sub(/^\w+(\.|#)/, '\1'))}/i]
        }.nil?
      }
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
drg-0.14.0 lib/drg/judge.rb
drg-0.13.1 lib/drg/judge.rb
drg-0.13.0 lib/drg/judge.rb
drg-0.12.0 lib/drg/judge.rb
drg-0.11.0 lib/drg/judge.rb
drg-0.10.0 lib/drg/judge.rb
drg-0.9.5 lib/drg/judge.rb
drg-0.9.4 lib/drg/judge.rb
drg-0.9.3 lib/drg/judge.rb
drg-0.9.2 lib/drg/judge.rb
drg-0.9.0 lib/drg/judge.rb
drg-0.8.1 lib/drg/judge.rb
drg-0.8.0 lib/drg/judge.rb
drg-0.7.0 lib/drg/judge.rb
drg-0.6.0 lib/drg/judge.rb
drg-0.5.1 lib/drg/judge.rb
drg-0.5.0 lib/drg/judge.rb
drg-0.4.2 lib/drg/judge.rb
drg-0.4.1 lib/drg/judge.rb
drg-0.4.0 lib/drg/judge.rb