Class: JpStringsFinder::RubyFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/jp_strings_finder/ruby_finder.rb

Defined Under Namespace

Classes: RipperCustom

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src) ⇒ RubyFinder

Returns a new instance of RubyFinder.



20
21
22
# File 'lib/jp_strings_finder/ruby_finder.rb', line 20

def initialize(src)
  @src = src
end

Instance Attribute Details

#srcObject (readonly)

Returns the value of attribute src.



18
19
20
# File 'lib/jp_strings_finder/ruby_finder.rb', line 18

def src
  @src
end

Instance Method Details

#findObject



24
25
26
27
28
# File 'lib/jp_strings_finder/ruby_finder.rb', line 24

def find
  ripper = RipperCustom.new(src)
  ripper.parse
  ripper.strings
end