Class: Chino::Drivers::PathDriver

Inherits:
BaseDriver show all
Defined in:
lib/chino/drivers/path_driver.rb

Overview

base class for all dependency drivers

Instance Method Summary collapse

Methods inherited from BaseDriver

#initialize

Constructor Details

This class inherits a constructor from Chino::Drivers::BaseDriver

Instance Method Details

#configObject



11
12
13
# File 'lib/chino/drivers/path_driver.rb', line 11

def config
  @config ||= Config.new(file: File.join(location, 'Chinofile'))
end

#exist?(file) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/chino/drivers/path_driver.rb', line 31

def exist?(file)
  config.bundle_exports.key?(file)
end

#inner_depsObject



35
36
37
# File 'lib/chino/drivers/path_driver.rb', line 35

def inner_deps
  []
end

#install!Object



23
# File 'lib/chino/drivers/path_driver.rb', line 23

def install!; end

#load_file(file) ⇒ Object



25
26
27
28
29
# File 'lib/chino/drivers/path_driver.rb', line 25

def load_file(file)
  return {} unless exist? file

  { filename: File.join(location, file) }
end

#locationObject



7
8
9
# File 'lib/chino/drivers/path_driver.rb', line 7

def location
  @dep[:location]
end

#nameObject



15
16
17
# File 'lib/chino/drivers/path_driver.rb', line 15

def name
  config.bundle_name
end

#versionObject



19
20
21
# File 'lib/chino/drivers/path_driver.rb', line 19

def version
  config.bundle_version
end