Class: CARPS::Sheet::Bool

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

Overview

Accept booleans

Instance Method Summary collapse

Methods inherited from Type

#coercion, #empty, #initialize, #verify

Constructor Details

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

Instance Method Details

#valid(val) ⇒ Object

Only true for if val.class is TrueClass or FalseClass



128
129
130
# File 'lib/carps/mod/sheet/type.rb', line 128

def valid val
   val.class == TrueClass or val.class == FalseClass
end