Myst::TFunctor
Inherits Myst::MutableValue / Reference / Object
A Functor is a container for multiple functor definitions, which can either be language-level or native.
Constructors
new(name : String, clauses : Array(Myst::TFunctorDef | Bool | Float64 | Int64 | Myst::MutableValue | String, Array(Bool | Float64 | Int64 | Myst::MutableValue | String), Nil | Myst::TFunctor -> Bool | Float64 | Int64 | Myst::MutableValue | String) = [] of Callable, lexical_scope : Scope = Scope.new, closure : Bool = false, closed_self : MTValue | Nil = nil)
SourceInstance methods
==(other : self)
Returns true if this reference is the same as other. Invokes same?.
add_clause(definition : Callable)
Sourceclauses
Sourceclauses=(clauses : Array(Callable))
Sourceclosed_self
Sourceclosed_self=(closed_self : MTValue | Nil)
Sourceclosed_self?
Sourceclosure?
Sourcehash(hasher)
See Object#hash(hasher)
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.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
lexical_scope
Sourcelexical_scope=(lexical_scope : Scope)
Sourcename
Sourcenew_scope
Sourcetype_name
Source