Module: Primer::Static::GenerateConstants
- Defined in:
- lib/primer/static/generate_constants.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.call ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/primer/static/generate_constants.rb', line 9 def call Primer::Component.descendants.sort_by(&:name).each_with_object({}) do |component, mem| mem[component.to_s] = component.constants(false).sort.each_with_object({}) do |constant, h| h[constant] = component.const_get(constant) end end end |