Class: StartingBlocks::ResultTextParser

Inherits:
Object
  • Object
show all
Defined in:
lib/starting_blocks/result_text_parser.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object (private)



16
17
18
# File 'lib/starting_blocks/result_text_parser.rb', line 16

def method_missing(meth, *args, &blk)
  get_count_of meth.to_s
end

Instance Method Details

#parse(text) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/starting_blocks/result_text_parser.rb', line 3

def parse(text)
  @text = text
  {
    tests:      greater_of([tests, runs]),
    assertions: assertions,
    failures:   failures,
    errors:     errors,
    skips:      skips
  }
end