Class: DateHolidays::Reader::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/date_holidays/reader/version.rb

Overview

Used to retrieve further version information such as the underlying Node module version.

Class Method Summary collapse

Class Method Details

.node_module_version(config = Config.default) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/date_holidays/reader/version.rb', line 21

def node_module_version(config = Config.default)
  # When running via node, check to see what version the user has
  # installed. This could be different from what is in this gem's
  # yarn.lock.
  if config.node_path
    JsBridge.new(config).get_output(VERSION_PROGRAM_PATH).chomp
  else
    from_yarn_dot_lock
  end
end