Top Level Namespace
Defined Under Namespace
Modules: TextUtils
Classes: CodeReader, File, FixtureReader, HashReader, HashReaderV2, LineReader, LineReaderV2, StringLineReader, ValuesReader, ValuesReaderV2
Instance Method Summary
collapse
Instance Method Details
#find_data_path_from_gemfile_gitref(name) ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/textutils/utils.rb', line 35
def find_data_path_from_gemfile_gitref( name )
puts "[debug] find_data_path( name='#{name}' )..."
puts "load path:"
pp $LOAD_PATH
name_esc = name.gsub( '.', '\.' )
name_regex = /\/((#{name_esc}-[a-z0-9]{12})|(#{name_esc}))\/lib$/
candidates = []
$LOAD_PATH.each do |path|
if path =~ name_regex
candidates << path[0..-5]
end
end
puts 'found candidates:'
pp candidates
candidates[0]
end
|
#title_esc_regex(title_unescaped) ⇒ Object
29
30
31
32
|
# File 'lib/textutils/utils.rb', line 29
def title_esc_regex( title_unescaped )
puts "*** warn: depreceated fn call: use TextUtils.title_esc_regex() or include TextUtils::TitleHelpers"
TextUtils.title_esc_regex( title_unescaped )
end
|