Sha256: 6286c7300c746e86b10e082021c94b1edaa9985696dc170d8e65daaba869e4aa
Contents?: true
Size: 365 Bytes
Versions: 2
Compression:
Stored size: 365 Bytes
Contents
# encoding: utf-8 module Piglet module Field class BinaryConditional include Field def initialize(test, if_true, if_false) @test, @if_true, @if_false = test, if_true, if_false @type = expression_type(@if_true) end def to_s "(#{@test} ? #{@if_true} : #{@if_false})" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
piglet-0.3.0 | lib/piglet/field/binary_conditional.rb |
piglet-0.2.5 | lib/piglet/field/binary_conditional.rb |