Module: Namey
- Defined in:
- lib/namey.rb,
lib/namey/parser.rb,
lib/namey/version.rb,
lib/namey/generator.rb
Defined Under Namespace
Classes: Generator, Parser
Constant Summary
collapse
- NAME =
"namey"
- VERSION =
"0.0.6"
Class Method Summary
collapse
Class Method Details
.db_path ⇒ Object
2
3
4
|
# File 'lib/namey.rb', line 2
def self.db_path
@@db_path ||= "sqlite://#{File.join(self.libdir, "..", "data", "names.db")}"
end
|
.db_path=(x) ⇒ Object
5
6
7
|
# File 'lib/namey.rb', line 5
def self.db_path=(x)
@@db_path = x
end
|
.libdir ⇒ Object
Return a directory with the project libraries.
13
14
15
16
17
18
|
# File 'lib/namey.rb', line 13
def self.libdir
t = ["#{File.expand_path(File.dirname(__FILE__))}", "#{Gem.dir}/gems/#{Namey::NAME}-#{Namey::VERSION}"]
t.each {|i| return i if File.readable?(i) }
raise "both paths are invalid: #{t}"
end
|