Class: Symbol
- 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
- #to_avro ⇒ Object
- #to_pig ⇒ Object
-
#to_proc ⇒ Object
Turn the symbol into a simple proc (stolen from
ActiveSupport::CoreExtensions::Symbol). - #to_sql ⇒ Object
Class Method Details
.to_avro ⇒ Object
60 |
# File 'lib/wukong/schema.rb', line 60 def to_avro() 'string' end |
.to_pig ⇒ Object
31 |
# File 'lib/wukong/schema.rb', line 31 def to_pig() 'chararray' end |
.to_sql ⇒ Object
11 |
# File 'lib/wukong/schema.rb', line 11 def to_sql() 'VARCHAR(255) CHARACTER SET ASCII' end |
Instance Method Details
#to_avro ⇒ Object
69 |
# File 'lib/wukong/schema.rb', line 69 def to_avro() self.to_s ; end |
#to_pig ⇒ Object
40 |
# File 'lib/wukong/schema.rb', line 40 def to_pig() self.to_s ; end |
#to_proc ⇒ Object
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_sql ⇒ Object
23 |
# File 'lib/wukong/schema.rb', line 23 def to_sql() self.to_s.upcase ; end |