Class: BareTypes::BarePrimitive

Inherits:
BaseType
  • Object
show all
Defined in:
lib/types.rb

Direct Known Subclasses

Bool, Data, F32, F64, I16, I32, I64, I8, Int, String, U16, U32, U64, U8, Uint, Void

Instance Method Summary collapse

Methods inherited from BaseType

#cycle_search, #initialize

Constructor Details

This class inherits a constructor from BareTypes::BaseType

Instance Method Details

#==(other) ⇒ Object

Types which are always equivalent to another instantiation of themselves Eg. Uint.new == Uint.new But Union.new(types1) != Union.new(types2)

since unions could have different sets of types


141
142
143
# File 'lib/types.rb', line 141

def ==(other)
  self.class == other.class
end

#finalize_references(schema) ⇒ Object



145
# File 'lib/types.rb', line 145

def finalize_references(schema) end

#to_schema(buffer) ⇒ Object



147
148
149
# File 'lib/types.rb', line 147

def to_schema(buffer)
  buffer << self.class.name.split('::').last.downcase
end