Class: TypedAttributes::Parser::FlagsType
- Defined in:
- lib/typed_attributes/parser/flags_type.rb
Instance Attribute Summary
Attributes inherited from BaseType
Instance Method Summary collapse
Methods inherited from BaseType
#initialize, #readers, #storage_var, #writers
Constructor Details
This class inherits a constructor from TypedAttributes::Parser::BaseType
Instance Method Details
#parse(values) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/typed_attributes/parser/flags_type.rb', line 5 def parse(values) array = super(values) array.map!(&:to_sym) array.select! { |v| [:from].include?(v) } if [:from] array end |