Module: Micro::Struct::Features::Options
- Defined in:
- lib/micro/struct/features.rb
Class Method Summary collapse
Class Method Details
.from(names:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/micro/struct/features.rb', line 7 def self.from(names:) = names.each_with_object({}) { |name, memo| memo[name] = true } { to_ary: .fetch(:to_ary, false), to_hash: .fetch(:to_hash, false), to_proc: .fetch(:to_proc, false), readonly: .fetch(:readonly, false), instance_copy: .fetch(:instance_copy, false), exposed_features: .fetch(:exposed_features, false) } end |