A toy dynamic programming language written in Ruby
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

class_definition.rb 336B

123456789101112131415
  1. class AST::ClassDefinition
  2. attr_reader :name, :members, :methods
  3. def initialize(name, members, methods)
  4. @name = name
  5. @members = members
  6. @methods = methods
  7. end
  8. def ==(other)
  9. other.is_a?(AST::ClassDefinition) && other.name == @name &&
  10. other.members == @members &&
  11. other.methods == @methods
  12. end
  13. end