class Icss::Meta::RecordField

Constants

ALLOWED_ORDERS

Attributes

parent[RW]

Public Instance Methods

is_reference?() click to toggle source

is the field a reference to a named type (true), or an inline schema (false)?

# File lib/icss/type/record_field.rb, line 47
def is_reference?() @is_reference ; end
merge(hsh) click to toggle source

Hack hack – makes it so fields go thru the receiver door when merged in RecordType

# File lib/icss/type/record_field.rb, line 60
def merge(hsh)
  dup.receive!(hsh)
end
order() click to toggle source

Order is defined by the avro spec

# File lib/icss/type/record_field.rb, line 65
def order()           @order || 'ascending' ; end
order_direction() click to toggle source
# File lib/icss/type/record_field.rb, line 66
def order_direction() case order when 'ascending' then 1 when 'descending' then -1 else 0 ; end ; end
to_hash() click to toggle source
Calls superclass method Icss::ReceiverModel::ActsAsHash#to_hash
# File lib/icss/type/record_field.rb, line 49
def to_hash()
  hsh = super
  hsh = hsh.merge({ :type => (is_reference? ? type.fullname : Type.schema_for(type)) })
  hsh.delete(:_extra_params)
  hsh
end
to_schema() click to toggle source
# File lib/icss/type/record_field.rb, line 55
def to_schema
  to_hash
end