Class: Dnf::BooleanExpression

Inherits:
Object
  • Object
show all
Defined in:
lib/dnf/boolean_expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression) ⇒ BooleanExpression

Returns a new instance of BooleanExpression.



5
6
7
# File 'lib/dnf/boolean_expression.rb', line 5

def initialize(expression)
  @expression = expression
end

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



3
4
5
# File 'lib/dnf/boolean_expression.rb', line 3

def expression
  @expression
end

Instance Method Details

#to_dnfObject



9
10
11
12
13
# File 'lib/dnf/boolean_expression.rb', line 9

def to_dnf
  expr = parse(expression)
  dnf = convert_to_dnf(expr)
  dnf_to_string(dnf)
end