Class: Babl::Nodes::Typed::Boolean

Inherits:
Base
  • Object
show all
Defined in:
lib/babl/nodes/typed.rb

Instance Method Summary collapse

Methods inherited from Base

#dependencies, #optimize, #pinned_dependencies

Instance Method Details

#render(frame) ⇒ Object



75
76
77
78
79
80
81
# File 'lib/babl/nodes/typed.rb', line 75

def render(frame)
    value = frame.object
    return value if true == value || false == value

    raise Errors::RenderingError,
        "Expected a boolean, got #{value.inspect}\n#{frame.formatted_stack}"
end

#schemaObject



71
72
73
# File 'lib/babl/nodes/typed.rb', line 71

def schema
    Schema::Typed::BOOLEAN
end