class AST::ClassDefinition attr_reader :name, :members, :instance_methods, :class_methods def initialize(name, members, instance_methods, class_methods) @name = name @members = members @instance_methods = instance_methods @class_methods = class_methods end def ==(other) other.is_a?(AST::ClassDefinition) && other.name == @name && other.members == @members && other.instance_methods == @instance_methods other.class_methods == @class_methods end def execute(env) env.set(@name.name, self) end end