Sha256: a33610c6aaf52e72f72c2afda3f12b98a04908ed9e936a2a725c63c7f01663b2
Contents?: true
Size: 636 Bytes
Versions: 1
Compression:
Stored size: 636 Bytes
Contents
module Metanorma class << self # https://stackoverflow.com/a/53399471 def parent_of(mod) parent_name = mod.name =~ /::[^:]+\Z/ ? $`.freeze : nil Object.const_get(parent_name) if parent_name end def all_modules(mod) [mod] + mod.constants.map { |c| mod.const_get(c) } .select { |c| c.is_a?(Module) && parent_of(c) == mod } .flat_map { |m| all_modules(m) } end def versioned(mod, flavour) all_modules(mod).select { |c| defined? c::VERSION } .select { |c| c.name =~ /Metanorma::#{flavour}$/ } end end module Standoc VERSION = "2.9.9".freeze end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
metanorma-standoc-2.9.9 | lib/metanorma/standoc/version.rb |