Sha256: 5d2f740a3fe62d319369439e9b006aaa125a60af352355c577729f132d5de4ea
Contents?: true
Size: 909 Bytes
Versions: 33
Compression:
Stored size: 909 Bytes
Contents
require 'forwardable' module Rley # This module is used as a namespace module Syntax # This module is used as a namespace # A symbol sequence is a suite of grammar symbols class SymbolSeq extend Forwardable def_delegators :@members, :empty?, :size, :[], :each, :find, :map # The sequence of symbols attr_reader(:members) def initialize(theSymbols) @members = theSymbols.dup end # Equality operator. def ==(other) return true if other.object_id == object_id case other when SymbolSeq then result = other.members == members when Array then result = other == members else msg = "Cannot compare a SymbolSeq with a #{other.class}" fail StandardError, msg end return result end end # class end # module end # module # End of file
Version data entries
33 entries across 33 versions & 1 rubygems