Class: Brigfile

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Brigfile

Returns a new instance of Brigfile.



4
5
6
7
# File 'lib/brigfile.rb', line 4

def initialize(path)
  @path = path
  raise "Brigfile does not exist." unless File.exists?(@path)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



2
3
4
# File 'lib/brigfile.rb', line 2

def path
  @path
end

Class Method Details

.load(path) ⇒ Object



9
10
11
# File 'lib/brigfile.rb', line 9

def self.load(path)
  Brigfile.new(path)
end