Module: Icss::Meta::EnumType
- Defined in:
- lib/icss/type/structured_schema.rb
Overview
A symbol from a pre-chosen set
Instance Method Summary collapse
Instance Method Details
#receive(raw) ⇒ Object
105 106 107 108 109 |
# File 'lib/icss/type/structured_schema.rb', line 105 def receive(raw) obj = super(raw) or return unless self.symbols.include?(obj) then raise ArgumentError, "Cannot receive #{raw}: must be one of #{symbols[0..2].join(',')}#{symbols.length > 3 ? ",..." : ""}" ; end obj end |
#to_schema ⇒ Object
110 |
# File 'lib/icss/type/structured_schema.rb', line 110 def to_schema() _schema.to_hash end |