Class: Ecogem::Path
- Inherits:
-
Object
- Object
- Ecogem::Path
- Defined in:
- lib/ecogem/path.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Instance Method Summary collapse
- #gemfile ⇒ Object
-
#initialize(dir) ⇒ Path
constructor
A new instance of Path.
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
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
3 4 5 |
# File 'lib/ecogem/path.rb', line 3 def dir @dir end |
Instance Method Details
#gemfile ⇒ Object
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 |