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 9 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 14 def ast(input = Undefined) [type, rule.ast(input)] end
to_s()
click to toggle source
# File lib/dry/logic/operations/unary.rb, line 18 def to_s "#{type}(#{rule})" end