C0 code coverage information

Generated on Sun Dec 21 22:36:24 +0000 2008 with rcov 0.8.1.2


Code reported as executed by Ruby looks like
    this... and this: this line is also marked as
    covered. Lines considered as run by rcov, but
    not reported by Ruby, look like this, and
    this: these lines were inferred by rcov (using simple heuristics).
    Finally, here's a line marked as not
    executed. 
Name Total lines Lines of code Total coverage Code coverage
lib/postalmethods/get_letter_status.rb 69 43
100.0%  
100.0%  
 1
    module PostalMethods  2
     3 module GetLetterStatus
     4  5 def get_letter_status(id)
     6 raise
    PostalMethods::NoPreparationException unless self.prepared  7  8 ## get status  9 opts = {:Username => self.username, :Password =>
    self.password, :ID => id} 10 11 rv
    = @rpc_driver.getLetterStatus(opts) 12 13
    ws_status = rv.getLetterStatusResult.resultCode.to_i 14 delivery_status =
    rv.getLetterStatusResult.status.to_i 15 last_update = rv.getLetterStatusResult.lastUpdateTime
    16 17 if ws_status == -3000 18 return [delivery_status,
    last_update] 19 elsif
    API_STATUS_CODES.has_key?(ws_status) 20 instance_eval("raise
    APIStatusCode#{ws_status.to_s.gsub(/( |\-)/,'')}Exception")
    21 end 22 23 end 24 25
    def get_letter_status_multiple(ids) 26 raise PostalMethods::NoPreparationException unless
    self.prepared 27
    28 if ids.class == Array
    29 ids =
    ids.join(",") 30 end 31 32
    # minimal input checking - let api take care of it 33 return
    PostalMethods::InvalidLetterIDsRange unless ids.class == String 34 35 ## get status 36 opts = {:Username => self.username, :Password =>
    self.password, :ID => ids} 37 38 rv
    = @rpc_driver.getLetterStatus_Multiple(opts) 39 40 ws_status =
    rv.getLetterStatus_MultipleResult.resultCode.to_i 41 42 if ws_status == -3000 43 return
    rv.getLetterStatus_MultipleResult.letterStatuses.letterStatus 44 elsif
    API_STATUS_CODES.has_key?(ws_status) 45 instance_eval("raise
    APIStatusCode#{ws_status.to_s.gsub(/( |\-)/,'')}Exception")
    46 end 47 48 end 49 50
    def get_letter_status_range(minid, maxid) 51 raise PostalMethods::NoPreparationException unless
    self.prepared 52
    53 ## get status
    54 opts = {:Username =>
    self.username, :Password => self.password, :MinID => minid.to_i,
    :MaxID => maxid.to_i} 55 56 rv
    = @rpc_driver.getLetterStatus_Range(opts) 57 58
    ws_status = rv.getLetterStatus_RangeResult.resultCode.to_i 59 60 if ws_status == -3000 61 return
    rv.getLetterStatus_RangeResult.letterStatuses.letterStatus 62 elsif
    API_STATUS_CODES.has_key?(ws_status) 63 instance_eval("raise
    APIStatusCode#{ws_status.to_s.gsub(/( |\-)/,'')}Exception")
    64 end 65 66 end 67 68
    end 69 end 

Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.

Valid XHTML 1.0! Valid CSS!