Class: Deimos::SchemaClass::Enum

Inherits:
Base
  • Object
show all
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

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

#symbolsArray<String>

Returns all the valid symbols for this enum.

Returns:

  • (Array<String>)

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/deimos/schema_class/enum.rb', line 12

def symbols
  raise NotImplementedError
end