class DrgDSL::Ast::AndExpression

Represents a list of expressions joined with an “AND”, e.g., “exp1 and exp2 and exp3 …”

Attributes

expressions[R]

Public Class Methods

new(expressions) click to toggle source
# File lib/drgdsl/ast.rb, line 114
def initialize(expressions)
  @expressions = expressions
end

Public Instance Methods

hash() click to toggle source
# File lib/drgdsl/ast.rb, line 122
def hash
  @hash ||= [type, *expressions].hash
end
to_hash() click to toggle source
# File lib/drgdsl/ast.rb, line 118
def to_hash
  { and: [expressions.map(&:to_hash)] }
end