Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/symath/type.rb,
lib/symath/value.rb

Instance Method Summary collapse

Instance Method Details

#to_mObject



369
370
371
# File 'lib/symath/value.rb', line 369

def to_m()
  return SyMath.parse(self)
end

#to_t(**args) ⇒ Object



265
266
267
268
269
270
271
# File 'lib/symath/type.rb', line 265

def to_t(**args)
  if args.empty? and SyMath::Type.types.key?(self.to_sym)
    return SyMath::Type.types[self.to_sym]
  end

  return SyMath::Type.new(self, **args)
end