Class: DRG::Judge
- Inherits:
-
Object
- Object
- DRG::Judge
- Defined in:
- lib/drg/judge.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Instance Method Summary collapse
-
#initialize(file, spec) ⇒ Judge
constructor
A new instance of Judge.
- #missing_methods ⇒ Object
Constructor Details
#initialize(file, spec) ⇒ Judge
Returns a new instance of Judge.
5 6 7 |
# File 'lib/drg/judge.rb', line 5 def initialize(file, spec) @file, @spec = file, spec end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/drg/judge.rb', line 3 def file @file end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
3 4 5 |
# File 'lib/drg/judge.rb', line 3 def spec @spec end |
Instance Method Details
#missing_methods ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/drg/judge.rb', line 9 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 |