Method: FunctionalLightService.impl
- Defined in:
- lib/functional-light-service/functional/enum.rb
.impl(enum_type, &block) ⇒ Object
rubocop:enable Metrics/AbcSize rubocop:enable Metrics/CyclomaticComplexity rubocop:enable Metrics/MethodLength rubocop:enable Metrics/PerceivedComplexity
247 248 249 250 251 252 253 |
# File 'lib/functional-light-service/functional/enum.rb', line 247 def impl(enum_type, &block) enum_type.variants.each do |v| name = "#{enum_type.name}::#{v}" type = Kernel.eval(name) type.class_eval(&block) end end |