class Dry::Logic::Operations::Unary
Attributes
rule[R]
Public Class Methods
new(*rules, **options)
click to toggle source
Calls superclass method
Dry::Logic::Operations::Abstract::new
# File lib/dry/logic/operations/unary.rb, line 11 def initialize(*rules, **options) super @rule = rules.first end
Public Instance Methods
ast(input = Undefined)
click to toggle source
# File lib/dry/logic/operations/unary.rb, line 16 def ast(input = Undefined) [type, rule.ast(input)] end
to_s()
click to toggle source
# File lib/dry/logic/operations/unary.rb, line 20 def to_s "#{type}(#{rule})" end