Class: String

Inherits:
Object show all
Defined in:
lib/rust-core.rb,
lib/rust-probabilities.rb

Instance Method Summary collapse

Instance Method Details

#distance(other) ⇒ Object

Raises:

  • (TypeError)


27
28
29
30
31
# File 'lib/rust-probabilities.rb', line 27

def distance(other)
    raise TypeError, "no implicit conversion of #{other.class} into String" unless other.is_a? String
    
    return self.bytes.distance other.bytes
end

#to_RObject



810
811
812
# File 'lib/rust-core.rb', line 810

def to_R
    return self.inspect
end