Sha256: 495bd695b4c015a64ee646eb7459682a88d7f252a347615a0f369953e980970c
Contents?: true
Size: 967 Bytes
Versions: 11
Compression:
Stored size: 967 Bytes
Contents
module ParserHelper def self.is_command?(line) is_feature?(line) || is_scenario?(line) || is_context?(line) || is_tag?(line) end def self.is_feature?(line) return line =~ /Funcionalidade:.*/ end def self.get_feature(line) line.gsub("Funcionalidade:", '').split(' ').join(' ') end def self.is_scenario?(line) return line =~ /CenĂ¡rio:.*/ end def self.get_scenario(line) line.gsub("CenĂ¡rio:", '').split(' ').join(' ') end def self.is_context?(line) return true if line =~ /Contexto:.*/ end def self.get_context(line) line.gsub("Contexto:", '').split(' ').join(' ') end def self.is_tag?(line) return true if line =~ /@.*/ end def self.is_screenshot?(line) return (line.include? "@screenshot") && (line.include? "@javascript") end def self.is_comment?(line) return true if line =~ /#.*/ end def self.read_line(file) line = file.gets line = line.gsub("\n", "").split(' ').join(' ') unless line.nil? line end end
Version data entries
11 entries across 11 versions & 1 rubygems