Class: Arli::ArliFile

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Library, Enumerable
Defined in:
lib/arli/arli_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Library

#library_model, #make_lib

Constructor Details

#initialize(config: Arli.config, libraries: []) ⇒ ArliFile

Returns a new instance of ArliFile.



26
27
28
29
30
31
32
33
34
# File 'lib/arli/arli_file.rb', line 26

def initialize(config: Arli.config, libraries: [])
  self.config = config
  self.arlifile_path = "#{config.arlifile.path}/#{config.arlifile.name}"
  self.dependencies = read_dependencies(libraries)

  self.config.libraries.temp_dir ||= Dir.mktmpdir

  configure_via_arlifile!(arlifile_hash)
end

Instance Attribute Details

#arlifile_hashObject

Returns the value of attribute arlifile_hash.



20
21
22
# File 'lib/arli/arli_file.rb', line 20

def arlifile_hash
  @arlifile_hash
end

#arlifile_pathObject

Returns the value of attribute arlifile_path.



20
21
22
# File 'lib/arli/arli_file.rb', line 20

def arlifile_path
  @arlifile_path
end

#configObject

Returns the value of attribute config.



20
21
22
# File 'lib/arli/arli_file.rb', line 20

def config
  @config
end

#dependenciesObject Also known as: libraries

Returns the value of attribute dependencies.



20
21
22
# File 'lib/arli/arli_file.rb', line 20

def dependencies
  @dependencies
end

#deviceObject

Returns the value of attribute device.



20
21
22
# File 'lib/arli/arli_file.rb', line 20

def device
  @device
end

Instance Method Details

#installObject



38
39
40
41
42
# File 'lib/arli/arli_file.rb', line 38

def install
  each_in_temp_path do |lib|
    lib.install
  end
end