Class: Bake::Registry::BakefileLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/bake/registry/bakefile_loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ BakefileLoader

Returns a new instance of BakefileLoader.



11
12
13
# File 'lib/bake/registry/bakefile_loader.rb', line 11

def initialize(path)
	@path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



19
20
21
# File 'lib/bake/registry/bakefile_loader.rb', line 19

def path
  @path
end

Instance Method Details

#each {|[]| ... } ⇒ Object

Yields:

  • ([])


21
22
23
# File 'lib/bake/registry/bakefile_loader.rb', line 21

def each(&block)
	yield []
end

#scopes_for(path) ⇒ Object



25
26
27
28
29
# File 'lib/bake/registry/bakefile_loader.rb', line 25

def scopes_for(path)
	if path == []
		yield Scope.load(@path, [])
	end
end

#to_sObject



15
16
17
# File 'lib/bake/registry/bakefile_loader.rb', line 15

def to_s
	"#{self.class} #{@path}"
end