class Myst::Location
- Myst::Location
- Reference
- Object
Defined in:
myst/syntax/location.crConstructors
Instance Method Summary
- #col : Int32
- #col=(col : Int32)
- #dirname : String | Nil
- #file : String
- #file=(file : String)
-
#inspect(io : IO)
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
-
#inspect
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
- #length : Int32
- #length=(length : Int32)
- #line : Int32
- #line=(line : Int32)
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
-
#to_s(colorize = false)
Returns a nicely readable and concise string representation of this object, typically intended for users.
Constructor Detail
Instance Method Detail
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO)
which can be overridden for custom implementations.
Also see #to_s
.
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.