Sha256: 8abe09a513fdcf1e48065e8d84de580113df6f1c6be067cba5b07b04c11f32a5
Contents?: true
Size: 547 Bytes
Versions: 3
Compression:
Stored size: 547 Bytes
Contents
require 'bioinform/support' require 'bioinform/parsers/parser' module Bioinform # TrivialParser can be used to parse hashes returned by #parse method of other parsers: # PM.new({matrix:[[1,2,3,4],[5,6,7,8]], name: 'Name'}, TrivialParser) # PM.new(StringParser.new("1 2 3 4\n5 6 7 8").parse) # StringParser.new("First\n1 2 3 4\n5 6 7 8\nSecond\n0 0 0 0").map{|inp| PM.new(inp, TrivialParser)} class TrivialParser < Parser def initialize(input) @input = input end def parse! input end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bioinform-0.1.7 | lib/bioinform/parsers/trivial_parser.rb |
bioinform-0.1.6 | lib/bioinform/parsers/trivial_parser.rb |
bioinform-0.1.5 | lib/bioinform/parsers/trivial_parser.rb |