Class: Envandle::Gemspec
- Inherits:
-
Object
- Object
- Envandle::Gemspec
- Defined in:
- lib/envandle/gemspec.rb
Class Method Summary collapse
Instance Method Summary collapse
- #dependencies ⇒ Object
-
#initialize(path) ⇒ Gemspec
constructor
A new instance of Gemspec.
- #name ⇒ Object
- #runtime_dependencies ⇒ Object
Constructor Details
#initialize(path) ⇒ Gemspec
Returns a new instance of Gemspec.
3 4 5 6 |
# File 'lib/envandle/gemspec.rb', line 3 def initialize(path) @path = path @native = ::Gem::Specification.load(path) end |
Class Method Details
.find_file(dir, name:) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/envandle/gemspec.rb', line 8 def self.find_file(dir, name:) name ||= "*" Dir.glob(File.join(dir, "#{name}.gemspec")) do |f| return f end nil end |
Instance Method Details
#dependencies ⇒ Object
20 21 22 |
# File 'lib/envandle/gemspec.rb', line 20 def dependencies @native.dependencies end |
#name ⇒ Object
16 17 18 |
# File 'lib/envandle/gemspec.rb', line 16 def name @native.name end |
#runtime_dependencies ⇒ Object
24 25 26 |
# File 'lib/envandle/gemspec.rb', line 24 def runtime_dependencies @native.runtime_dependencies end |