Class: GemPath
- Inherits:
-
Object
- Object
- GemPath
- Defined in:
- lib/gem_path.rb,
lib/gem_path/version.rb
Constant Summary collapse
- GemNotFound =
Class.new(RuntimeError)
- VERSION =
"1.0.0"
Class Method Summary collapse
Instance Method Summary collapse
- #find ⇒ Object
-
#initialize(name) ⇒ GemPath
constructor
A new instance of GemPath.
Constructor Details
#initialize(name) ⇒ GemPath
Returns a new instance of GemPath.
10 11 12 |
# File 'lib/gem_path.rb', line 10 def initialize(name) @name = name end |
Class Method Details
.find(name) ⇒ Object
6 7 8 |
# File 'lib/gem_path.rb', line 6 def self.find(name) new(name).find end |
Instance Method Details
#find ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/gem_path.rb', line 14 def find if gem_exists? gemspec.gem_dir else raise GemNotFound, "Couldn't find gem directory for '#{name}'" end end |