Class: Babl::Nodes::Typed::String
Instance Method Summary collapse
Methods inherited from Base
#dependencies, #optimize, #pinned_dependencies
Instance Method Details
#render(frame) ⇒ Object
31 32 33 34 35 36 37 38 |
# 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 |