Class: Deimos::SchemaClass::Enum
- Defined in:
- lib/deimos/schema_class/enum.rb
Overview
Base Class for Enum Classes generated from Avro.
Class Method Summary collapse
Instance Method Summary collapse
-
#symbols ⇒ Array<String>
Returns all the valid symbols for this enum.
Methods inherited from Base
#==, #as_json, #initialize, #to_h, #to_json, #to_s
Constructor Details
This class inherits a constructor from Deimos::SchemaClass::Base
Class Method Details
.initialize_from_value(value) ⇒ Object
:nodoc:
17 18 19 20 21 |
# File 'lib/deimos/schema_class/enum.rb', line 17 def self.initialize_from_value(value) return nil if value.nil? value.is_a?(self) ? value : self.new(value) end |
Instance Method Details
#symbols ⇒ Array<String>
Returns all the valid symbols for this enum.
12 13 14 |
# File 'lib/deimos/schema_class/enum.rb', line 12 def symbols raise NotImplementedError end |