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)


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

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

#inner_depsObject



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

def inner_deps
  []
end

#install!Object



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

def install!
end

#load_file(file) ⇒ Object



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

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