class JpStringsFinder::SlimFinder

Attributes

src[R]

Public Class Methods

new(src) click to toggle source
# File lib/jp_strings_finder/slim_finder.rb, line 5
def initialize(src)
  @src = src
end

Public Instance Methods

find() click to toggle source

Very very rough implementation for the moment…

# File lib/jp_strings_finder/slim_finder.rb, line 10
def find
  strings = src.split("\n")
  # Remove Slim comments
  strings.reject { |s| s.strip.match?(/^\/[:blank]*/) }
end