Top Level Namespace
Defined Under Namespace
Modules: TextUtils
Classes: CodeReader, File, FixtureReader, HashReader, HashReaderV2, LineReader, LineReaderV2, StringLineReader, Time, ValuesReader, ValuesReaderV2
Instance Method Summary
collapse
Instance Method Details
#find_data_path_from_gemfile_gitref(name) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/textutils/utils.rb', line 18
def find_data_path_from_gemfile_gitref( name )
puts "[textutils] 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
12
13
14
15
|
# File 'lib/textutils/utils.rb', line 12
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
|