class Babl::Nodes::Typed::String

Public Instance Methods

render(frame) click to toggle source
# File lib/babl/nodes/typed.rb, line 31
def render(frame)
    value = frame.object
    return value if ::String === value
    return value.to_s if ::Symbol === value

    raise Errors::RenderingError,
        "Expected a string, got #{value.inspect}\n#{frame.formatted_stack}"
end
schema() click to toggle source
# File lib/babl/nodes/typed.rb, line 27
def schema
    Schema::Typed::STRING
end