Class: Librarian::Specfile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(environment, path) ⇒ Specfile

Returns a new instance of Specfile


9
10
11
12
# File 'lib/librarian/specfile.rb', line 9

def initialize(environment, path)
  self.environment = environment
  self.path = Pathname(path)
end

Instance Attribute Details

#environmentObject

Returns the value of attribute environment


6
7
8
# File 'lib/librarian/specfile.rb', line 6

def environment
  @environment
end

#pathObject

Returns the value of attribute path


6
7
8
# File 'lib/librarian/specfile.rb', line 6

def path
  @path
end

Instance Method Details

#read(precache_sources = []) ⇒ Object


14
15
16
# File 'lib/librarian/specfile.rb', line 14

def read(precache_sources = [])
  environment.dsl(path, precache_sources)
end