Class: CARPS::Sheet::Text

Inherits:
Type
  • Object
show all
Defined in:
lib/carps/mod/sheet/type.rb

Overview

Accept Strings

Instance Method Summary collapse

Methods inherited from Type

#initialize, #verify

Constructor Details

This class inherits a constructor from CARPS::Sheet::Type

Instance Method Details

#coercionObject



94
95
96
# File 'lib/carps/mod/sheet/type.rb', line 94

def coercion
   :to_s
end

#empty(val) ⇒ Object



98
99
100
101
102
103
104
# File 'lib/carps/mod/sheet/type.rb', line 98

def empty val
   if val.class == String
      return val.empty?
   else
      return false
   end
end

#valid(val) ⇒ Object



90
91
92
# File 'lib/carps/mod/sheet/type.rb', line 90

def valid val
   true
end