Module: Reflex::Packager::Extension

Defined in:
lib/reflex/packager/extension.rb

Class Method Summary collapse

Class Method Details

.name(downcase = false) ⇒ Object



12
13
14
15
16
# File 'lib/reflex/packager/extension.rb', line 12

def name(downcase = false)
  super().split('::')[..-2].join.then {|s|
    downcase ? s.gsub(/([a-z])([A-Z])/) {"#{$1}-#{$2}"}.downcase : s
  }
end

.root_dir(path = '') ⇒ Object



22
23
24
# File 'lib/reflex/packager/extension.rb', line 22

def root_dir(path = '')
  File.expand_path "../../../#{path}", __dir__
end

.versionObject



18
19
20
# File 'lib/reflex/packager/extension.rb', line 18

def version()
  File.read(root_dir 'VERSION')[/[\d\.]+/]
end