Module: FBParsers
- Defined in:
- lib/parser_collection.rb
Constant Summary collapse
- @@parse_1730742887066429 =
lambda do || price = nil title = nil = nil price_regex = /NT\$([\d,\.]+)/ lines = .split("\n") if lines.length >= 3 unless price_regex.match(lines[1]).nil? price = price_regex.match(lines[1])[1] end end if not price.nil? {"price" => price.gsub(",","").to_i , "title" => lines[0] ,"body" => lines[2..-1].join("\n")} else raise ArgumentError, "message parse fail" end end
- @@tools =
{ "1730742887066429" => @@parse_1730742887066429, "144498012423141" => @@parse_1730742887066429, "107793636088378" => @@parse_1730742887066429, "191505604299442" => @@parse_1730742887066429 }
Class Method Summary collapse
Class Method Details
.message_parser(gid) ⇒ Object
30 31 32 |
# File 'lib/parser_collection.rb', line 30 def self. (gid) @@tools[gid] end |
.message_parser_all ⇒ Object
33 34 35 |
# File 'lib/parser_collection.rb', line 33 def self. @@tools end |