Sha256: 8e7ddce89a0616ec76f3ac8eafadbf32b9c354f0e0a3e8d57d0ef5f9ff62d29c

Contents?: true

Size: 793 Bytes

Versions: 15

Compression:

Stored size: 793 Bytes

Contents

module ParserHelper

	def self.is_comando?(line)
		is_funcionalidade?(line) || is_cenario?(line) || is_contexto?(line) || is_marcacao?(line) || is_comentario?(line)
	end

	def self.is_funcionalidade?(line)
		return line =~ /Funcionalidade:.*/
	end

	def self.get_funcionalidade(line)
		line.gsub("Funcionalidade: ", '').split(' ').join(' ')
	end

	def self.is_cenario?(line)
		return line =~ /CenĂ¡rio:.*/
	end

	def self.get_cenario(line)
		line.gsub("CenĂ¡rio:", '').split(' ').join(' ')
	end

	def self.is_contexto?(line)
		return true if line =~ /Contexto:.*/
	end

	def self.get_contexto(line)
		line.gsub("Contexto:", '').split(' ').join(' ')
	end

	def self.is_marcacao?(line)
		return true if line =~ /@.*/
	end

	def self.is_comentario?(line)
		return true if line =~ /#.*/
	end


end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
aipim-rails-0.0.41 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.40 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.23 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.22 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.21 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.20 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.19 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.18 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.17 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.16 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.15 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.11 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.10 lib/aipim-rails/parser_helper.rb
aipim-rails-0.0.9 lib/aipim-rails/parser_helper.rb
aipim-0.0.8 lib/aipim/parser_helper.rb