Class: Symbol

Inherits:
Object show all
Defined in:
lib/wukong/extensions/symbol.rb,
lib/wukong/schema.rb,
lib/wukong/schema.rb,
lib/wukong/schema.rb,
lib/wukong/schema.rb

Overview

h2. extensions/symbol.rb – extensions to symbol class

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.to_avroObject



60
# File 'lib/wukong/schema.rb', line 60

def to_avro() 'string'        end

.to_pigObject



31
# File 'lib/wukong/schema.rb', line 31

def to_pig() 'chararray'     end

.to_sqlObject



11
# File 'lib/wukong/schema.rb', line 11

def to_sql() 'VARCHAR(255) CHARACTER SET ASCII' end

Instance Method Details

#to_avroObject



69
# File 'lib/wukong/schema.rb', line 69

def to_avro() self.to_s ;     end

#to_pigObject



40
# File 'lib/wukong/schema.rb', line 40

def to_pig() self.to_s ; end

#to_procObject

Turn the symbol into a simple proc (stolen from ActiveSupport::CoreExtensions::Symbol).



8
9
10
# File 'lib/wukong/extensions/symbol.rb', line 8

def to_proc
  Proc.new { |*args| args.shift.__send__(self, *args) }
end

#to_sqlObject



23
# File 'lib/wukong/schema.rb', line 23

def to_sql() self.to_s.upcase ; end