Class: Ecogem::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/ecogem/path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dir) ⇒ Path

Returns a new instance of Path.



5
6
7
# File 'lib/ecogem/path.rb', line 5

def initialize(dir)
  @dir = dir
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



3
4
5
# File 'lib/ecogem/path.rb', line 3

def dir
  @dir
end

Instance Method Details

#gemfileObject



13
14
15
16
17
# File 'lib/ecogem/path.rb', line 13

def gemfile
  @gemfile ||= begin
    ::Ecogem::Gemfile.new(gemfile_path) if ::File.file?(gemfile_path)
  end
end