Class: Rus3::Evaluator::Environment

Inherits:
Object
  • Object
show all
Includes:
Rus3::EmptyList, Procedure::Arithmetic, Procedure::Char, Procedure::Comparison, Procedure::Control, Procedure::List, Procedure::Predicate, Procedure::Vector, Procedure::Write
Defined in:
lib/rus3/evaluator/environment.rb

Constant Summary

Constants included from Rus3::EmptyList

Rus3::EmptyList::EMPTY_LIST

Constants included from Procedure::Vector

Procedure::Vector::UNDEF

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Rus3::EmptyList

#null?

Methods included from Procedure::Arithmetic

#add, #div, #mod, #mul, #subtract

Methods included from Procedure::Comparison

#ge?, #gt?, #le?, #lt?, #same_value?

Methods included from Procedure::Predicate

#boolean?, #char?, #char_alphabetic?, #char_ci_eq?, #char_ci_ge?, #char_ci_gt?, #char_ci_le?, #char_ci_lt?, #char_eq?, #char_ge?, #char_gt?, #char_le?, #char_lower_case?, #char_lt?, #char_numeric?, #char_upper_case?, #char_whitespace?, #complex?, #eq?, #eqv?, #even?, #input_port?, #integer?, #list?, #negative?, #number?, #odd?, #output_port?, #pair?, #port?, #positive?, #procedure?, #rational?, #real?, #string?, #string_ci_eq?, #string_ci_ge?, #string_ci_gt?, #string_ci_le?, #string_ci_lt?, #string_eq?, #string_ge?, #string_gt?, #string_le?, #string_lt?, #symbol?, #vector?, #zero?

Methods included from Procedure::Char

#char_downcase, #char_to_integer, #char_upcase, #integer_to_char

Methods included from Procedure::List

#append, #caar, #cadr, #car, #cdar, #cddr, #cdr, #cons, #length, #list, #list_ref, #list_tail, #reverse, #set_car!, #set_cdr!

Methods included from Procedure::Utils

#check_list, #check_pair, #check_upper_limit, #check_vector

Methods included from Procedure::Vector

#list_to_vector, #make_vector, #vector, #vector_fill!, #vector_length, #vector_ref, #vector_set!, #vector_to_list

Methods included from Procedure::Write

#display, #write

Methods included from Procedure::Control

#map, #zip

Constructor Details

#initializeEnvironment

Returns a new instance of Environment.



20
21
22
# File 'lib/rus3/evaluator/environment.rb', line 20

def initialize
  @binding = Kernel.binding
end

Instance Attribute Details

#bindingObject (readonly)

Returns the value of attribute binding.



18
19
20
# File 'lib/rus3/evaluator/environment.rb', line 18

def binding
  @binding
end