Sha256: a291d31ff324dec38a9c80b0cf8589a3d29e28fe75962f5c9e4ac11992b7f898
Contents?: true
Size: 1.7 KB
Versions: 1
Compression:
Stored size: 1.7 KB
Contents
module Biro module Bvs class ScoreResponseBuilder def initialize(body) @body = build(body) end def transaction @body[0..7] end def version @body[8..9] end def reserved_applicant @body[10..19] end def reserved_bvs @body[20..39] end def service_code @body[40..47] end def search_type @body[48..55] end def search_version @body[56..57] end def response_type @body[58] end def return_code @body[59] end def search_number @body[60..66] end def response_text_size @body[67..70].to_i end def response_text @body[71,response_text_size] || "" end def response_text_init response_text[0..2] end def response_text_type response_text[3..5] end def response_text_is_present response_text[6] end def response_text_document_type response_text[7] end def response_text_document response_text[8..21] end def response_text_name response_text[22..136] || "" end def response_text_result_score response_text[137..140] end def response_text_description response_text[141..160] end def response_text_over response_text[160..500] end def error_message response_text[8..100] || "general bvs error" end def build(body) body.gsub("\n", '').gsub("\t", '').gsub("\\t", '').gsub("\\n", '').scan(/<PRE>([^<>]*)<\/PRE>/imu).flatten[0] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
biro-0.6.6 | lib/biro/gateways/bvs/builders/score_response_builder.rb |