Class: Maxima::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/maxima/boolean.rb

Constant Summary collapse

TRUE_REGEX =
/\s*true\s*/i

Class Method Summary collapse

Class Method Details

.parse(string) ⇒ Object



6
7
8
9
10
# File 'lib/maxima/boolean.rb', line 6

def self.parse(string)
  !!(TRUE_REGEX =~ string)
rescue
  nil
end