Class: String

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

Overview

class FalseClass

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.to_avroObject



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

def to_avro() 'string'        end

.to_pigObject



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

def to_pig() 'chararray'     end

.to_sqlObject



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

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

Instance Method Details

#blank?TrueClass, FalseClass

Strips out whitespace then tests if the string is empty.

"".blank?         #=>  true
"     ".blank?    #=>  true
" hey ho ".blank? #=>  false

Returns:



90
91
92
# File 'lib/wukong/extensions/blank.rb', line 90

def blank?
  strip.empty?
end

#to_avroObject



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

def to_avro() self.to_s ;     end

#to_pigObject



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

def to_pig() self.to_s ; end

#to_sqlObject



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

def to_sql() self             ; end