Class: Envandle::Gemspec

Inherits:
Object
  • Object
show all
Defined in:
lib/envandle/gemspec.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#dependenciesObject



20
21
22
# File 'lib/envandle/gemspec.rb', line 20

def dependencies
  @native.dependencies
end

#nameObject



16
17
18
# File 'lib/envandle/gemspec.rb', line 16

def name
  @native.name
end

#runtime_dependenciesObject



24
25
26
# File 'lib/envandle/gemspec.rb', line 24

def runtime_dependencies
  @native.runtime_dependencies
end