Documentation ¶
Index ¶
- func NewLoadError(name string, callstack string) *loadError
- func NewNameError(name, context, className string, callStack string) *nameError
- func NewNoMethodError(name, context, className, callstack string) *noMethodError
- type ArgEvaluator
- type Array
- func (valueStub *Array) AddMethod(m Method)
- func (array *Array) Append(v Value)
- func (valueStub *Array) Class() Class
- func (v *Array) GetAttribute(name string) (Value, bool)
- func (valueStub *Array) GetClassVariable(name string) Value
- func (valueStub *Array) GetInstanceVariable(name string) Value
- func (v *Array) IsTruthy() bool
- func (array *Array) Members() []Value
- func (valueStub *Array) Method(name string) Method
- func (valueStub *Array) Methods() []Method
- func (valueStub *Array) PrettyPrint() string
- func (valueStub *Array) RemoveMethod(m Method)
- func (v *Array) SetAttribute(name string, value Value)
- func (valueStub *Array) SetClassVariable(name string, value Value)
- func (valueStub *Array) SetInstanceVariable(name string, value Value)
- func (array *Array) String() string
- type ArrayClass
- func (klass *ArrayClass) AddInstanceMethod(m Method)
- func (valueStub *ArrayClass) AddMethod(m Method)
- func (valueStub *ArrayClass) Class() Class
- func (v *ArrayClass) GetAttribute(name string) (Value, bool)
- func (valueStub *ArrayClass) GetClassVariable(name string) Value
- func (valueStub *ArrayClass) GetInstanceVariable(name string) Value
- func (classStub *ArrayClass) Include(module Module)
- func (v *ArrayClass) IsTruthy() bool
- func (valueStub *ArrayClass) Method(name string) Method
- func (valueStub *ArrayClass) Methods() []Method
- func (array *ArrayClass) Name() string
- func (klass *ArrayClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *ArrayClass) PrettyPrint() string
- func (valueStub *ArrayClass) RemoveMethod(m Method)
- func (v *ArrayClass) SetAttribute(name string, value Value)
- func (valueStub *ArrayClass) SetClassVariable(name string, value Value)
- func (valueStub *ArrayClass) SetInstanceVariable(name string, value Value)
- func (array *ArrayClass) String() string
- func (classStub *ArrayClass) SuperClass() Class
- type BasicObjectClass
- func (valueStub *BasicObjectClass) AddMethod(m Method)
- func (valueStub *BasicObjectClass) Class() Class
- func (v *BasicObjectClass) GetAttribute(name string) (Value, bool)
- func (valueStub *BasicObjectClass) GetClassVariable(name string) Value
- func (valueStub *BasicObjectClass) GetInstanceVariable(name string) Value
- func (classStub *BasicObjectClass) Include(module Module)
- func (v *BasicObjectClass) IsTruthy() bool
- func (valueStub *BasicObjectClass) Method(name string) Method
- func (valueStub *BasicObjectClass) Methods() []Method
- func (obj *BasicObjectClass) Name() string
- func (obj *BasicObjectClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *BasicObjectClass) PrettyPrint() string
- func (valueStub *BasicObjectClass) RemoveMethod(m Method)
- func (v *BasicObjectClass) SetAttribute(name string, value Value)
- func (valueStub *BasicObjectClass) SetClassVariable(name string, value Value)
- func (valueStub *BasicObjectClass) SetInstanceVariable(name string, value Value)
- func (c *BasicObjectClass) SetSuperClass()
- func (obj *BasicObjectClass) String() string
- func (classStub *BasicObjectClass) SuperClass() Class
- type Block
- type BlockArg
- type BlockEvaluator
- type Class
- func NewArgumentErrorClass(provider Provider) Class
- func NewArrayClass(provider Provider) Class
- func NewBasicObjectClass(provider Provider) Class
- func NewClassClass(provider Provider) Class
- func NewDirClass(provider Provider) Class
- func NewEncodingClass(provider Provider) Class
- func NewExceptionClass(provider Provider) Class
- func NewFalseClass(provider Provider) Class
- func NewFileClass(provider Provider) Class
- func NewFixnumClass(provider Provider) Class
- func NewFloatClass(provider Provider) Class
- func NewGenericClass(name, superClass string, provider Provider) Class
- func NewGlobalObjectClass(provider Provider) Class
- func NewHashClass(provider Provider) Class
- func NewIOClass(provider Provider) Class
- func NewIntegerClass(provider Provider) Class
- func NewModuleClass(provider Provider, evaluator Evaluator) Class
- func NewNilClass(provider Provider) Class
- func NewNumericClass(provider Provider) Class
- func NewProcClass(provider Provider) Class
- func NewRegexpClass(provider Provider) Class
- func NewStandardErrorClass(provider Provider) Class
- func NewStringClass(provider Provider) Class
- func NewSymbolClass(provider Provider) Class
- func NewTrueClass(provider Provider) Class
- func NewUserDefinedClass(name, superclassName string, provider Provider) Class
- type ClassProvider
- type ClassValue
- func (valueStub *ClassValue) AddMethod(m Method)
- func (valueStub *ClassValue) Class() Class
- func (v *ClassValue) GetAttribute(name string) (Value, bool)
- func (valueStub *ClassValue) GetClassVariable(name string) Value
- func (valueStub *ClassValue) GetInstanceVariable(name string) Value
- func (classStub *ClassValue) Include(module Module)
- func (v *ClassValue) IsTruthy() bool
- func (valueStub *ClassValue) Method(name string) Method
- func (valueStub *ClassValue) Methods() []Method
- func (c ClassValue) Name() string
- func (c ClassValue) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *ClassValue) PrettyPrint() string
- func (valueStub *ClassValue) RemoveMethod(m Method)
- func (v *ClassValue) SetAttribute(name string, value Value)
- func (valueStub *ClassValue) SetClassVariable(name string, value Value)
- func (valueStub *ClassValue) SetInstanceVariable(name string, value Value)
- func (c *ClassValue) SetSuperClass()
- func (c ClassValue) String() string
- func (classStub *ClassValue) SuperClass() Class
- type Evaluator
- type FloatValue
- func (valueStub *FloatValue) AddMethod(m Method)
- func (valueStub *FloatValue) Class() Class
- func (v *FloatValue) GetAttribute(name string) (Value, bool)
- func (valueStub *FloatValue) GetClassVariable(name string) Value
- func (valueStub *FloatValue) GetInstanceVariable(name string) Value
- func (v *FloatValue) IsTruthy() bool
- func (valueStub *FloatValue) Method(name string) Method
- func (valueStub *FloatValue) Methods() []Method
- func (valueStub *FloatValue) PrettyPrint() string
- func (valueStub *FloatValue) RemoveMethod(m Method)
- func (v *FloatValue) SetAttribute(name string, value Value)
- func (valueStub *FloatValue) SetClassVariable(name string, value Value)
- func (valueStub *FloatValue) SetInstanceVariable(name string, value Value)
- func (FloatValue *FloatValue) String() string
- func (FloatValue *FloatValue) ValueAsFloat() float64
- type Hash
- func (hash *Hash) Add(key, value Value)
- func (valueStub *Hash) AddMethod(m Method)
- func (valueStub *Hash) Class() Class
- func (v *Hash) GetAttribute(name string) (Value, bool)
- func (valueStub *Hash) GetClassVariable(name string) Value
- func (valueStub *Hash) GetInstanceVariable(name string) Value
- func (v *Hash) IsTruthy() bool
- func (valueStub *Hash) Method(name string) Method
- func (valueStub *Hash) Methods() []Method
- func (valueStub *Hash) PrettyPrint() string
- func (valueStub *Hash) RemoveMethod(m Method)
- func (v *Hash) SetAttribute(name string, value Value)
- func (valueStub *Hash) SetClassVariable(name string, value Value)
- func (valueStub *Hash) SetInstanceVariable(name string, value Value)
- func (hash *Hash) String() string
- type HashClass
- func (klass *HashClass) AddInstanceMethod(m Method)
- func (valueStub *HashClass) AddMethod(m Method)
- func (valueStub *HashClass) Class() Class
- func (v *HashClass) GetAttribute(name string) (Value, bool)
- func (valueStub *HashClass) GetClassVariable(name string) Value
- func (valueStub *HashClass) GetInstanceVariable(name string) Value
- func (classStub *HashClass) Include(module Module)
- func (v *HashClass) IsTruthy() bool
- func (valueStub *HashClass) Method(name string) Method
- func (valueStub *HashClass) Methods() []Method
- func (hash *HashClass) Name() string
- func (klass *HashClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *HashClass) PrettyPrint() string
- func (valueStub *HashClass) RemoveMethod(m Method)
- func (v *HashClass) SetAttribute(name string, value Value)
- func (valueStub *HashClass) SetClassVariable(name string, value Value)
- func (valueStub *HashClass) SetInstanceVariable(name string, value Value)
- func (hash *HashClass) String() string
- func (classStub *HashClass) SuperClass() Class
- type Method
- func NewNativeMethod(name string, provider Provider, ...) Method
- func NewNativePrivateMethod(name string, provider Provider, ...) Method
- func NewPrivateRubyMethod(name string, lineNumber int, args []ast.MethodParam, rubyBody []ast.Node, ...) Method
- func NewRubyMethod(name string, lineNumber int, args []ast.MethodParam, rubyBody []ast.Node, ...) Method
- type MethodProvider
- type MethodVisibility
- type Module
- type ModuleClass
- func (valueStub *ModuleClass) AddMethod(m Method)
- func (valueStub *ModuleClass) Class() Class
- func (v *ModuleClass) GetAttribute(name string) (Value, bool)
- func (valueStub *ModuleClass) GetClassVariable(name string) Value
- func (valueStub *ModuleClass) GetInstanceVariable(name string) Value
- func (classStub *ModuleClass) Include(module Module)
- func (v *ModuleClass) IsTruthy() bool
- func (valueStub *ModuleClass) Method(name string) Method
- func (valueStub *ModuleClass) Methods() []Method
- func (c ModuleClass) Name() string
- func (c ModuleClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *ModuleClass) PrettyPrint() string
- func (valueStub *ModuleClass) RemoveMethod(m Method)
- func (v *ModuleClass) SetAttribute(name string, value Value)
- func (valueStub *ModuleClass) SetClassVariable(name string, value Value)
- func (valueStub *ModuleClass) SetInstanceVariable(name string, value Value)
- func (c ModuleClass) String() string
- func (classStub *ModuleClass) SuperClass() Class
- type NilClass
- func (valueStub *NilClass) AddMethod(m Method)
- func (valueStub *NilClass) Class() Class
- func (v *NilClass) GetAttribute(name string) (Value, bool)
- func (valueStub *NilClass) GetClassVariable(name string) Value
- func (valueStub *NilClass) GetInstanceVariable(name string) Value
- func (classStub *NilClass) Include(module Module)
- func (v *NilClass) IsTruthy() bool
- func (valueStub *NilClass) Method(name string) Method
- func (valueStub *NilClass) Methods() []Method
- func (n *NilClass) Name() string
- func (class *NilClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *NilClass) PrettyPrint() string
- func (valueStub *NilClass) RemoveMethod(m Method)
- func (v *NilClass) SetAttribute(name string, value Value)
- func (valueStub *NilClass) SetClassVariable(name string, value Value)
- func (valueStub *NilClass) SetInstanceVariable(name string, value Value)
- func (n *NilClass) String() string
- func (classStub *NilClass) SuperClass() Class
- type ObjectClass
- func (valueStub *ObjectClass) AddMethod(m Method)
- func (valueStub *ObjectClass) Class() Class
- func (v *ObjectClass) GetAttribute(name string) (Value, bool)
- func (valueStub *ObjectClass) GetClassVariable(name string) Value
- func (valueStub *ObjectClass) GetInstanceVariable(name string) Value
- func (classStub *ObjectClass) Include(module Module)
- func (v *ObjectClass) IsTruthy() bool
- func (valueStub *ObjectClass) Method(name string) Method
- func (valueStub *ObjectClass) Methods() []Method
- func (obj *ObjectClass) Name() string
- func (obj *ObjectClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *ObjectClass) PrettyPrint() string
- func (valueStub *ObjectClass) RemoveMethod(m Method)
- func (v *ObjectClass) SetAttribute(name string, value Value)
- func (valueStub *ObjectClass) SetClassVariable(name string, value Value)
- func (valueStub *ObjectClass) SetInstanceVariable(name string, value Value)
- func (c *ObjectClass) SetSuperClass()
- func (obj *ObjectClass) String() string
- func (classStub *ObjectClass) SuperClass() Class
- type Proc
- func (valueStub *Proc) AddMethod(m Method)
- func (proc *Proc) Call(args ...Value) (Value, error)
- func (valueStub *Proc) Class() Class
- func (v *Proc) GetAttribute(name string) (Value, bool)
- func (valueStub *Proc) GetClassVariable(name string) Value
- func (valueStub *Proc) GetInstanceVariable(name string) Value
- func (v *Proc) IsTruthy() bool
- func (valueStub *Proc) Method(name string) Method
- func (valueStub *Proc) Methods() []Method
- func (valueStub *Proc) PrettyPrint() string
- func (valueStub *Proc) RemoveMethod(m Method)
- func (v *Proc) SetAttribute(name string, value Value)
- func (valueStub *Proc) SetClassVariable(name string, value Value)
- func (valueStub *Proc) SetInstanceVariable(name string, value Value)
- func (valueStub *Proc) String() string
- type ProcClass
- func (valueStub *ProcClass) AddMethod(m Method)
- func (valueStub *ProcClass) Class() Class
- func (v *ProcClass) GetAttribute(name string) (Value, bool)
- func (valueStub *ProcClass) GetClassVariable(name string) Value
- func (valueStub *ProcClass) GetInstanceVariable(name string) Value
- func (classStub *ProcClass) Include(module Module)
- func (v *ProcClass) IsTruthy() bool
- func (valueStub *ProcClass) Method(name string) Method
- func (valueStub *ProcClass) Methods() []Method
- func (proc *ProcClass) Name() string
- func (klass *ProcClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *ProcClass) PrettyPrint() string
- func (valueStub *ProcClass) RemoveMethod(m Method)
- func (v *ProcClass) SetAttribute(name string, value Value)
- func (valueStub *ProcClass) SetClassVariable(name string, value Value)
- func (valueStub *ProcClass) SetInstanceVariable(name string, value Value)
- func (proc *ProcClass) String() string
- func (classStub *ProcClass) SuperClass() Class
- type Provider
- type Regexp
- func (valueStub *Regexp) AddMethod(m Method)
- func (valueStub *Regexp) Class() Class
- func (v *Regexp) GetAttribute(name string) (Value, bool)
- func (valueStub *Regexp) GetClassVariable(name string) Value
- func (valueStub *Regexp) GetInstanceVariable(name string) Value
- func (v *Regexp) IsTruthy() bool
- func (valueStub *Regexp) Method(name string) Method
- func (valueStub *Regexp) Methods() []Method
- func (valueStub *Regexp) PrettyPrint() string
- func (valueStub *Regexp) RemoveMethod(m Method)
- func (v *Regexp) SetAttribute(name string, value Value)
- func (valueStub *Regexp) SetClassVariable(name string, value Value)
- func (valueStub *Regexp) SetInstanceVariable(name string, value Value)
- func (regexp *Regexp) String() string
- type RubyMethod
- func (valueStub *RubyMethod) AddMethod(m Method)
- func (method *RubyMethod) Args() []methodArg
- func (method *RubyMethod) Body() []ast.Node
- func (valueStub *RubyMethod) Class() Class
- func (method *RubyMethod) Execute(self Value, block Block, args ...Value) (Value, error)
- func (v *RubyMethod) GetAttribute(name string) (Value, bool)
- func (valueStub *RubyMethod) GetClassVariable(name string) Value
- func (valueStub *RubyMethod) GetInstanceVariable(name string) Value
- func (method *RubyMethod) IsPrivate() bool
- func (method *RubyMethod) IsProtected() bool
- func (method *RubyMethod) IsPublic() bool
- func (v *RubyMethod) IsTruthy() bool
- func (valueStub *RubyMethod) Method(name string) Method
- func (valueStub *RubyMethod) Methods() []Method
- func (method *RubyMethod) Name() string
- func (valueStub *RubyMethod) PrettyPrint() string
- func (valueStub *RubyMethod) RemoveMethod(m Method)
- func (v *RubyMethod) SetAttribute(name string, value Value)
- func (valueStub *RubyMethod) SetClassVariable(name string, value Value)
- func (valueStub *RubyMethod) SetInstanceVariable(name string, value Value)
- func (method *RubyMethod) SetVisibility(visibility MethodVisibility)
- func (method *RubyMethod) String() string
- func (method *RubyMethod) Visibility() MethodVisibility
- type RubyModule
- func (m *RubyModule) ActiveVisibility() MethodVisibility
- func (m *RubyModule) AddInstanceMethod(method Method)
- func (valueStub *RubyModule) AddMethod(m Method)
- func (valueStub *RubyModule) Class() Class
- func (m *RubyModule) Constant(name string) (Value, error)
- func (m *RubyModule) Constants() []Value
- func (m *RubyModule) ConstantsWithNames() map[string]Value
- func (v *RubyModule) GetAttribute(name string) (Value, bool)
- func (valueStub *RubyModule) GetClassVariable(name string) Value
- func (valueStub *RubyModule) GetInstanceVariable(name string) Value
- func (m *RubyModule) InstanceMethod(name string) (Method, error)
- func (m *RubyModule) InstanceMethods() []Method
- func (v *RubyModule) IsTruthy() bool
- func (valueStub *RubyModule) Method(name string) Method
- func (valueStub *RubyModule) Methods() []Method
- func (m RubyModule) Name() string
- func (valueStub *RubyModule) PrettyPrint() string
- func (m *RubyModule) RemoveInstanceMethod(method Method)
- func (valueStub *RubyModule) RemoveMethod(m Method)
- func (m *RubyModule) SetActiveVisibility(visibility MethodVisibility)
- func (v *RubyModule) SetAttribute(name string, value Value)
- func (valueStub *RubyModule) SetClassVariable(name string, value Value)
- func (m *RubyModule) SetConstant(name string, value Value)
- func (valueStub *RubyModule) SetInstanceVariable(name string, value Value)
- func (m *RubyModule) String() string
- type SingletonProvider
- type StackProvider
- type StringClass
- func (valueStub *StringClass) AddMethod(m Method)
- func (valueStub *StringClass) Class() Class
- func (v *StringClass) GetAttribute(name string) (Value, bool)
- func (valueStub *StringClass) GetClassVariable(name string) Value
- func (valueStub *StringClass) GetInstanceVariable(name string) Value
- func (classStub *StringClass) Include(module Module)
- func (v *StringClass) IsTruthy() bool
- func (valueStub *StringClass) Method(name string) Method
- func (valueStub *StringClass) Methods() []Method
- func (c *StringClass) Name() string
- func (class *StringClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *StringClass) PrettyPrint() string
- func (valueStub *StringClass) RemoveMethod(m Method)
- func (v *StringClass) SetAttribute(name string, value Value)
- func (valueStub *StringClass) SetClassVariable(name string, value Value)
- func (valueStub *StringClass) SetInstanceVariable(name string, value Value)
- func (c *StringClass) String() string
- func (classStub *StringClass) SuperClass() Class
- type StringValue
- func (valueStub *StringValue) AddMethod(m Method)
- func (valueStub *StringValue) Class() Class
- func (v *StringValue) GetAttribute(name string) (Value, bool)
- func (valueStub *StringValue) GetClassVariable(name string) Value
- func (valueStub *StringValue) GetInstanceVariable(name string) Value
- func (v *StringValue) IsTruthy() bool
- func (valueStub *StringValue) Method(name string) Method
- func (valueStub *StringValue) Methods() []Method
- func (s *StringValue) PrettyPrint() string
- func (s *StringValue) RawString() string
- func (valueStub *StringValue) RemoveMethod(m Method)
- func (v *StringValue) SetAttribute(name string, value Value)
- func (valueStub *StringValue) SetClassVariable(name string, value Value)
- func (valueStub *StringValue) SetInstanceVariable(name string, value Value)
- func (s *StringValue) String() string
- type SymbolValue
- func (valueStub *SymbolValue) AddMethod(m Method)
- func (valueStub *SymbolValue) Class() Class
- func (v *SymbolValue) GetAttribute(name string) (Value, bool)
- func (valueStub *SymbolValue) GetClassVariable(name string) Value
- func (valueStub *SymbolValue) GetInstanceVariable(name string) Value
- func (v *SymbolValue) IsTruthy() bool
- func (valueStub *SymbolValue) Method(name string) Method
- func (valueStub *SymbolValue) Methods() []Method
- func (SymbolValue *SymbolValue) Name() string
- func (valueStub *SymbolValue) PrettyPrint() string
- func (valueStub *SymbolValue) RemoveMethod(m Method)
- func (v *SymbolValue) SetAttribute(name string, value Value)
- func (valueStub *SymbolValue) SetClassVariable(name string, value Value)
- func (valueStub *SymbolValue) SetInstanceVariable(name string, value Value)
- func (SymbolValue *SymbolValue) String() string
- type UserDefinedClass
- func (valueStub *UserDefinedClass) AddMethod(m Method)
- func (c *UserDefinedClass) Class() Class
- func (v *UserDefinedClass) GetAttribute(name string) (Value, bool)
- func (valueStub *UserDefinedClass) GetClassVariable(name string) Value
- func (valueStub *UserDefinedClass) GetInstanceVariable(name string) Value
- func (classStub *UserDefinedClass) Include(module Module)
- func (v *UserDefinedClass) IsTruthy() bool
- func (valueStub *UserDefinedClass) Method(name string) Method
- func (valueStub *UserDefinedClass) Methods() []Method
- func (c UserDefinedClass) Name() string
- func (c *UserDefinedClass) New(provider Provider, args ...Value) (Value, error)
- func (valueStub *UserDefinedClass) PrettyPrint() string
- func (valueStub *UserDefinedClass) RemoveMethod(m Method)
- func (v *UserDefinedClass) SetAttribute(name string, value Value)
- func (valueStub *UserDefinedClass) SetClassVariable(name string, value Value)
- func (valueStub *UserDefinedClass) SetInstanceVariable(name string, value Value)
- func (c UserDefinedClass) String() string
- func (classStub *UserDefinedClass) SuperClass() Class
- type UserDefinedClassInstance
- func (valueStub *UserDefinedClassInstance) AddMethod(m Method)
- func (valueStub *UserDefinedClassInstance) Class() Class
- func (v *UserDefinedClassInstance) GetAttribute(name string) (Value, bool)
- func (valueStub *UserDefinedClassInstance) GetClassVariable(name string) Value
- func (valueStub *UserDefinedClassInstance) GetInstanceVariable(name string) Value
- func (v *UserDefinedClassInstance) IsTruthy() bool
- func (valueStub *UserDefinedClassInstance) Method(name string) Method
- func (valueStub *UserDefinedClassInstance) Methods() []Method
- func (valueStub *UserDefinedClassInstance) PrettyPrint() string
- func (valueStub *UserDefinedClassInstance) RemoveMethod(m Method)
- func (v *UserDefinedClassInstance) SetAttribute(name string, value Value)
- func (valueStub *UserDefinedClassInstance) SetClassVariable(name string, value Value)
- func (valueStub *UserDefinedClassInstance) SetInstanceVariable(name string, value Value)
- func (i *UserDefinedClassInstance) String() string
- type Value
- func NewENVConstant(provider Provider) Value
- func NewFixnum(val int64, provider Provider) Value
- func NewFloat(val float64, provider Provider) Value
- func NewRegexp(provider Provider, expr string) Value
- func NewString(str string, provider Provider) Value
- func NewSymbol(val string, provider Provider) Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoadError ¶
func NewNameError ¶
func NewNoMethodError ¶
func NewNoMethodError(name, context, className, callstack string) *noMethodError
Types ¶
type ArgEvaluator ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func (*Array) GetAttribute ¶
func (*Array) GetClassVariable ¶
func (*Array) GetInstanceVariable ¶
func (*Array) PrettyPrint ¶
func (valueStub *Array) PrettyPrint() string
func (*Array) RemoveMethod ¶
func (valueStub *Array) RemoveMethod(m Method)
func (*Array) SetAttribute ¶
func (*Array) SetClassVariable ¶
func (*Array) SetInstanceVariable ¶
type ArrayClass ¶
type ArrayClass struct {
// contains filtered or unexported fields
}
func (*ArrayClass) AddInstanceMethod ¶
func (klass *ArrayClass) AddInstanceMethod(m Method)
func (*ArrayClass) GetAttribute ¶
func (*ArrayClass) GetClassVariable ¶
func (*ArrayClass) GetInstanceVariable ¶
func (*ArrayClass) Name ¶
func (array *ArrayClass) Name() string
func (*ArrayClass) New ¶
func (klass *ArrayClass) New(provider Provider, args ...Value) (Value, error)
func (*ArrayClass) PrettyPrint ¶
func (valueStub *ArrayClass) PrettyPrint() string
func (*ArrayClass) RemoveMethod ¶
func (valueStub *ArrayClass) RemoveMethod(m Method)
func (*ArrayClass) SetAttribute ¶
func (*ArrayClass) SetClassVariable ¶
func (*ArrayClass) SetInstanceVariable ¶
func (*ArrayClass) String ¶
func (array *ArrayClass) String() string
func (*ArrayClass) SuperClass ¶
func (classStub *ArrayClass) SuperClass() Class
type BasicObjectClass ¶
type BasicObjectClass struct {
// contains filtered or unexported fields
}
func (*BasicObjectClass) GetAttribute ¶
func (*BasicObjectClass) GetClassVariable ¶
func (*BasicObjectClass) GetInstanceVariable ¶
func (*BasicObjectClass) Name ¶
func (obj *BasicObjectClass) Name() string
func (*BasicObjectClass) New ¶
func (obj *BasicObjectClass) New(provider Provider, args ...Value) (Value, error)
func (*BasicObjectClass) PrettyPrint ¶
func (valueStub *BasicObjectClass) PrettyPrint() string
func (*BasicObjectClass) RemoveMethod ¶
func (valueStub *BasicObjectClass) RemoveMethod(m Method)
func (*BasicObjectClass) SetAttribute ¶
func (*BasicObjectClass) SetClassVariable ¶
func (*BasicObjectClass) SetInstanceVariable ¶
func (*BasicObjectClass) SetSuperClass ¶
func (c *BasicObjectClass) SetSuperClass()
func (*BasicObjectClass) String ¶
func (obj *BasicObjectClass) String() string
func (*BasicObjectClass) SuperClass ¶
func (classStub *BasicObjectClass) SuperClass() Class
type Block ¶
type Block interface { Call(args ...Value) (Value, error) // contains filtered or unexported methods }
func NewBlock ¶
func NewBlock(Context Value, args []ast.MethodParam, body []ast.Node, evaluator BlockEvaluator) Block
type BlockEvaluator ¶
type Class ¶
type Class interface { Module // includes Value New(provider Provider, args ...Value) (Value, error) SuperClass() Class Include(Module) // contains filtered or unexported methods }
abstract class interface
func NewArgumentErrorClass ¶
func NewArrayClass ¶
func NewBasicObjectClass ¶
func NewClassClass ¶
func NewDirClass ¶
func NewEncodingClass ¶
func NewExceptionClass ¶
func NewFalseClass ¶
func NewFileClass ¶
func NewFixnumClass ¶
func NewFloatClass ¶
func NewGenericClass ¶
func NewGlobalObjectClass ¶
func NewHashClass ¶
func NewIOClass ¶
func NewIntegerClass ¶
func NewModuleClass ¶
func NewNilClass ¶
func NewNumericClass ¶
func NewProcClass ¶
func NewRegexpClass ¶
func NewStandardErrorClass ¶
func NewStringClass ¶
func NewSymbolClass ¶
func NewTrueClass ¶
func NewUserDefinedClass ¶
type ClassProvider ¶
type ClassValue ¶
type ClassValue struct {
// contains filtered or unexported fields
}
globlal Class class
func (*ClassValue) GetAttribute ¶
func (*ClassValue) GetClassVariable ¶
func (*ClassValue) GetInstanceVariable ¶
func (ClassValue) Name ¶
func (c ClassValue) Name() string
func (*ClassValue) PrettyPrint ¶
func (valueStub *ClassValue) PrettyPrint() string
func (*ClassValue) RemoveMethod ¶
func (valueStub *ClassValue) RemoveMethod(m Method)
func (*ClassValue) SetAttribute ¶
func (*ClassValue) SetClassVariable ¶
func (*ClassValue) SetInstanceVariable ¶
func (*ClassValue) SetSuperClass ¶
func (c *ClassValue) SetSuperClass()
func (ClassValue) String ¶
func (c ClassValue) String() string
func (*ClassValue) SuperClass ¶
func (classStub *ClassValue) SuperClass() Class
type FloatValue ¶
type FloatValue struct {
// contains filtered or unexported fields
}
func (*FloatValue) GetAttribute ¶
func (*FloatValue) GetClassVariable ¶
func (*FloatValue) GetInstanceVariable ¶
func (*FloatValue) PrettyPrint ¶
func (valueStub *FloatValue) PrettyPrint() string
func (*FloatValue) RemoveMethod ¶
func (valueStub *FloatValue) RemoveMethod(m Method)
func (*FloatValue) SetAttribute ¶
func (*FloatValue) SetClassVariable ¶
func (*FloatValue) SetInstanceVariable ¶
func (*FloatValue) String ¶
func (FloatValue *FloatValue) String() string
func (*FloatValue) ValueAsFloat ¶
func (FloatValue *FloatValue) ValueAsFloat() float64
type Hash ¶
type Hash struct {
// contains filtered or unexported fields
}
func (*Hash) GetAttribute ¶
func (*Hash) GetClassVariable ¶
func (*Hash) GetInstanceVariable ¶
func (*Hash) PrettyPrint ¶
func (valueStub *Hash) PrettyPrint() string
func (*Hash) RemoveMethod ¶
func (valueStub *Hash) RemoveMethod(m Method)
func (*Hash) SetAttribute ¶
func (*Hash) SetClassVariable ¶
func (*Hash) SetInstanceVariable ¶
type HashClass ¶
type HashClass struct {
// contains filtered or unexported fields
}
func (*HashClass) AddInstanceMethod ¶
func (*HashClass) GetAttribute ¶
func (*HashClass) GetClassVariable ¶
func (*HashClass) GetInstanceVariable ¶
func (*HashClass) PrettyPrint ¶
func (valueStub *HashClass) PrettyPrint() string
func (*HashClass) RemoveMethod ¶
func (valueStub *HashClass) RemoveMethod(m Method)
func (*HashClass) SetAttribute ¶
func (*HashClass) SetClassVariable ¶
func (*HashClass) SetInstanceVariable ¶
func (*HashClass) SuperClass ¶
func (classStub *HashClass) SuperClass() Class
type Method ¶
type Method interface { Value Name() string IsPrivate() bool IsPublic() bool IsProtected() bool Execute(self Value, block Block, args ...Value) (Value, error) Visibility() MethodVisibility SetVisibility(MethodVisibility) // contains filtered or unexported methods }
func NewNativeMethod ¶
func NewNativePrivateMethod ¶
func NewPrivateRubyMethod ¶
func NewPrivateRubyMethod( name string, lineNumber int, args []ast.MethodParam, rubyBody []ast.Node, provider Provider, evaluator ArgEvaluator, body func(self Value, method *RubyMethod) (Value, error), ) Method
func NewRubyMethod ¶
func NewRubyMethod( name string, lineNumber int, args []ast.MethodParam, rubyBody []ast.Node, provider Provider, evaluator ArgEvaluator, body func(self Value, method *RubyMethod) (Value, error), ) Method
type MethodProvider ¶
type MethodVisibility ¶
type MethodVisibility int
const ( Public MethodVisibility = iota Private Protected )
type Module ¶
type Module interface { Name() string AddInstanceMethod(Method) RemoveInstanceMethod(Method) InstanceMethods() []Method InstanceMethod(string) (Method, error) Constants() []Value ConstantsWithNames() map[string]Value Constant(string) (Value, error) SetConstant(string, Value) Value ActiveVisibility() MethodVisibility SetActiveVisibility(MethodVisibility) }
abstract module interface
func NewComparableModule ¶
func NewGenericModule ¶
func NewGlobalKernelModule ¶
func NewProcessModule ¶
type ModuleClass ¶
type ModuleClass struct {
// contains filtered or unexported fields
}
globlal Module class
func (*ModuleClass) GetAttribute ¶
func (*ModuleClass) GetClassVariable ¶
func (*ModuleClass) GetInstanceVariable ¶
func (ModuleClass) Name ¶
func (c ModuleClass) Name() string
func (*ModuleClass) PrettyPrint ¶
func (valueStub *ModuleClass) PrettyPrint() string
func (*ModuleClass) RemoveMethod ¶
func (valueStub *ModuleClass) RemoveMethod(m Method)
func (*ModuleClass) SetAttribute ¶
func (*ModuleClass) SetClassVariable ¶
func (*ModuleClass) SetInstanceVariable ¶
func (ModuleClass) String ¶
func (c ModuleClass) String() string
func (*ModuleClass) SuperClass ¶
func (classStub *ModuleClass) SuperClass() Class
type NilClass ¶
type NilClass struct {
// contains filtered or unexported fields
}
func (*NilClass) GetAttribute ¶
func (*NilClass) GetClassVariable ¶
func (*NilClass) GetInstanceVariable ¶
func (*NilClass) PrettyPrint ¶
func (valueStub *NilClass) PrettyPrint() string
func (*NilClass) RemoveMethod ¶
func (valueStub *NilClass) RemoveMethod(m Method)
func (*NilClass) SetAttribute ¶
func (*NilClass) SetClassVariable ¶
func (*NilClass) SetInstanceVariable ¶
func (*NilClass) SuperClass ¶
func (classStub *NilClass) SuperClass() Class
type ObjectClass ¶
type ObjectClass struct {
// contains filtered or unexported fields
}
func (*ObjectClass) GetAttribute ¶
func (*ObjectClass) GetClassVariable ¶
func (*ObjectClass) GetInstanceVariable ¶
func (*ObjectClass) Name ¶
func (obj *ObjectClass) Name() string
func (*ObjectClass) New ¶
func (obj *ObjectClass) New(provider Provider, args ...Value) (Value, error)
func (*ObjectClass) PrettyPrint ¶
func (valueStub *ObjectClass) PrettyPrint() string
func (*ObjectClass) RemoveMethod ¶
func (valueStub *ObjectClass) RemoveMethod(m Method)
func (*ObjectClass) SetAttribute ¶
func (*ObjectClass) SetClassVariable ¶
func (*ObjectClass) SetInstanceVariable ¶
func (*ObjectClass) SetSuperClass ¶
func (c *ObjectClass) SetSuperClass()
func (*ObjectClass) String ¶
func (obj *ObjectClass) String() string
func (*ObjectClass) SuperClass ¶
func (classStub *ObjectClass) SuperClass() Class
type Proc ¶
type Proc struct {
// contains filtered or unexported fields
}
func NewProcInstance ¶
func (*Proc) GetAttribute ¶
func (*Proc) GetClassVariable ¶
func (*Proc) GetInstanceVariable ¶
func (*Proc) PrettyPrint ¶
func (valueStub *Proc) PrettyPrint() string
func (*Proc) RemoveMethod ¶
func (valueStub *Proc) RemoveMethod(m Method)
func (*Proc) SetAttribute ¶
func (*Proc) SetClassVariable ¶
func (*Proc) SetInstanceVariable ¶
type ProcClass ¶
type ProcClass struct {
// contains filtered or unexported fields
}
func (*ProcClass) GetAttribute ¶
func (*ProcClass) GetClassVariable ¶
func (*ProcClass) GetInstanceVariable ¶
func (*ProcClass) PrettyPrint ¶
func (valueStub *ProcClass) PrettyPrint() string
func (*ProcClass) RemoveMethod ¶
func (valueStub *ProcClass) RemoveMethod(m Method)
func (*ProcClass) SetAttribute ¶
func (*ProcClass) SetClassVariable ¶
func (*ProcClass) SetInstanceVariable ¶
func (*ProcClass) SuperClass ¶
func (classStub *ProcClass) SuperClass() Class
type Provider ¶
type Provider interface { ArgEvaluator() ArgEvaluator ClassProvider() ClassProvider SingletonProvider() SingletonProvider StackProvider() StackProvider MethodProvider() MethodProvider }
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
func (*Regexp) GetAttribute ¶
func (*Regexp) GetClassVariable ¶
func (*Regexp) GetInstanceVariable ¶
func (*Regexp) PrettyPrint ¶
func (valueStub *Regexp) PrettyPrint() string
func (*Regexp) RemoveMethod ¶
func (valueStub *Regexp) RemoveMethod(m Method)
func (*Regexp) SetAttribute ¶
func (*Regexp) SetClassVariable ¶
func (*Regexp) SetInstanceVariable ¶
type RubyMethod ¶
type RubyMethod struct {
// contains filtered or unexported fields
}
func (*RubyMethod) Args ¶
func (method *RubyMethod) Args() []methodArg
func (*RubyMethod) Body ¶
func (method *RubyMethod) Body() []ast.Node
func (*RubyMethod) GetAttribute ¶
func (*RubyMethod) GetClassVariable ¶
func (*RubyMethod) GetInstanceVariable ¶
func (*RubyMethod) IsPrivate ¶
func (method *RubyMethod) IsPrivate() bool
func (*RubyMethod) IsProtected ¶
func (method *RubyMethod) IsProtected() bool
func (*RubyMethod) IsPublic ¶
func (method *RubyMethod) IsPublic() bool
func (*RubyMethod) Name ¶
func (method *RubyMethod) Name() string
func (*RubyMethod) PrettyPrint ¶
func (valueStub *RubyMethod) PrettyPrint() string
func (*RubyMethod) RemoveMethod ¶
func (valueStub *RubyMethod) RemoveMethod(m Method)
func (*RubyMethod) SetAttribute ¶
func (*RubyMethod) SetClassVariable ¶
func (*RubyMethod) SetInstanceVariable ¶
func (*RubyMethod) SetVisibility ¶
func (method *RubyMethod) SetVisibility(visibility MethodVisibility)
func (*RubyMethod) String ¶
func (method *RubyMethod) String() string
FIXME: in order to fix this, the method needs to know what it is attached to
func (*RubyMethod) Visibility ¶
func (method *RubyMethod) Visibility() MethodVisibility
type RubyModule ¶
type RubyModule struct {
// contains filtered or unexported fields
}
user defined module type
func (*RubyModule) ActiveVisibility ¶
func (m *RubyModule) ActiveVisibility() MethodVisibility
func (*RubyModule) AddInstanceMethod ¶
func (m *RubyModule) AddInstanceMethod(method Method)
func (*RubyModule) ConstantsWithNames ¶
func (*RubyModule) GetAttribute ¶
func (*RubyModule) GetClassVariable ¶
func (*RubyModule) GetInstanceVariable ¶
func (*RubyModule) InstanceMethod ¶
func (*RubyModule) InstanceMethods ¶
func (m *RubyModule) InstanceMethods() []Method
func (RubyModule) Name ¶
func (m RubyModule) Name() string
func (*RubyModule) PrettyPrint ¶
func (valueStub *RubyModule) PrettyPrint() string
func (*RubyModule) RemoveInstanceMethod ¶
func (m *RubyModule) RemoveInstanceMethod(method Method)
func (*RubyModule) RemoveMethod ¶
func (valueStub *RubyModule) RemoveMethod(m Method)
func (*RubyModule) SetActiveVisibility ¶
func (m *RubyModule) SetActiveVisibility(visibility MethodVisibility)
func (*RubyModule) SetAttribute ¶
func (*RubyModule) SetClassVariable ¶
func (*RubyModule) SetConstant ¶
func (*RubyModule) SetInstanceVariable ¶
func (*RubyModule) String ¶
func (m *RubyModule) String() string
type SingletonProvider ¶
type StackProvider ¶
type StringClass ¶
type StringClass struct {
// contains filtered or unexported fields
}
func (*StringClass) GetAttribute ¶
func (*StringClass) GetClassVariable ¶
func (*StringClass) GetInstanceVariable ¶
func (*StringClass) Name ¶
func (c *StringClass) Name() string
func (*StringClass) New ¶
func (class *StringClass) New(provider Provider, args ...Value) (Value, error)
func (*StringClass) PrettyPrint ¶
func (valueStub *StringClass) PrettyPrint() string
func (*StringClass) RemoveMethod ¶
func (valueStub *StringClass) RemoveMethod(m Method)
func (*StringClass) SetAttribute ¶
func (*StringClass) SetClassVariable ¶
func (*StringClass) SetInstanceVariable ¶
func (*StringClass) String ¶
func (c *StringClass) String() string
func (*StringClass) SuperClass ¶
func (classStub *StringClass) SuperClass() Class
type StringValue ¶
type StringValue struct {
// contains filtered or unexported fields
}
func (*StringValue) GetAttribute ¶
func (*StringValue) GetClassVariable ¶
func (*StringValue) GetInstanceVariable ¶
func (*StringValue) PrettyPrint ¶
func (s *StringValue) PrettyPrint() string
func (*StringValue) RawString ¶
func (s *StringValue) RawString() string
func (*StringValue) RemoveMethod ¶
func (valueStub *StringValue) RemoveMethod(m Method)
func (*StringValue) SetAttribute ¶
func (*StringValue) SetClassVariable ¶
func (*StringValue) SetInstanceVariable ¶
func (*StringValue) String ¶
func (s *StringValue) String() string
type SymbolValue ¶
type SymbolValue struct {
// contains filtered or unexported fields
}
func (*SymbolValue) GetAttribute ¶
func (*SymbolValue) GetClassVariable ¶
func (*SymbolValue) GetInstanceVariable ¶
func (*SymbolValue) Name ¶
func (SymbolValue *SymbolValue) Name() string
func (*SymbolValue) PrettyPrint ¶
func (valueStub *SymbolValue) PrettyPrint() string
func (*SymbolValue) RemoveMethod ¶
func (valueStub *SymbolValue) RemoveMethod(m Method)
func (*SymbolValue) SetAttribute ¶
func (*SymbolValue) SetClassVariable ¶
func (*SymbolValue) SetInstanceVariable ¶
func (*SymbolValue) String ¶
func (SymbolValue *SymbolValue) String() string
type UserDefinedClass ¶
type UserDefinedClass struct {
// contains filtered or unexported fields
}
user defined class type
func (*UserDefinedClass) Class ¶
func (c *UserDefinedClass) Class() Class
func (*UserDefinedClass) GetAttribute ¶
func (*UserDefinedClass) GetClassVariable ¶
func (*UserDefinedClass) GetInstanceVariable ¶
func (UserDefinedClass) Name ¶
func (c UserDefinedClass) Name() string
func (*UserDefinedClass) New ¶
func (c *UserDefinedClass) New(provider Provider, args ...Value) (Value, error)
func (*UserDefinedClass) PrettyPrint ¶
func (valueStub *UserDefinedClass) PrettyPrint() string
func (*UserDefinedClass) RemoveMethod ¶
func (valueStub *UserDefinedClass) RemoveMethod(m Method)
func (*UserDefinedClass) SetAttribute ¶
func (*UserDefinedClass) SetClassVariable ¶
func (*UserDefinedClass) SetInstanceVariable ¶
func (UserDefinedClass) String ¶
func (c UserDefinedClass) String() string
func (*UserDefinedClass) SuperClass ¶
func (classStub *UserDefinedClass) SuperClass() Class
type UserDefinedClassInstance ¶
type UserDefinedClassInstance struct {
// contains filtered or unexported fields
}
func (*UserDefinedClassInstance) AddMethod ¶
func (valueStub *UserDefinedClassInstance) AddMethod(m Method)
func (*UserDefinedClassInstance) GetAttribute ¶
func (*UserDefinedClassInstance) GetClassVariable ¶
func (*UserDefinedClassInstance) GetInstanceVariable ¶
func (*UserDefinedClassInstance) Methods ¶
func (valueStub *UserDefinedClassInstance) Methods() []Method
func (*UserDefinedClassInstance) PrettyPrint ¶
func (valueStub *UserDefinedClassInstance) PrettyPrint() string
func (*UserDefinedClassInstance) RemoveMethod ¶
func (valueStub *UserDefinedClassInstance) RemoveMethod(m Method)
func (*UserDefinedClassInstance) SetAttribute ¶
func (*UserDefinedClassInstance) SetClassVariable ¶
func (*UserDefinedClassInstance) SetInstanceVariable ¶
func (*UserDefinedClassInstance) String ¶
func (i *UserDefinedClassInstance) String() string
type Value ¶
type Value interface { String() string PrettyPrint() string Class() Class AddMethod(Method) RemoveMethod(Method) Method(string) Method Methods() []Method GetInstanceVariable(string) Value SetInstanceVariable(string, Value) GetClassVariable(string) Value SetClassVariable(string, Value) IsTruthy() bool GetAttribute(string) (Value, bool) SetAttribute(string, Value) // contains filtered or unexported methods }
func NewENVConstant ¶
Source Files ¶
- argument_error.go
- array.go
- basic_object.go
- block.go
- boolean.go
- builtin_class.go
- builtin_module.go
- class.go
- class_stub.go
- comparable.go
- dependencies.go
- dir.go
- encoding.go
- env.go
- exception.go
- file.go
- fixnum.go
- float.go
- hash.go
- integer.go
- io.go
- kernel.go
- loaderror.go
- method.go
- module.go
- module_stub.go
- nameerror.go
- nil.go
- no_method_error.go
- numeric.go
- object.go
- proc.go
- process.go
- regexp.go
- ruby_method.go
- standard_error.go
- strings.go
- symbols.go
- value.go
- value_stub.go
Click to show internal directories.
Click to hide internal directories.