class Structured::String

Private Class Methods

parse(yaml_value, stack:, context: nil) click to toggle source
# File lib/structured/string.rb, line 5
def self.parse(yaml_value, stack:, context: nil)
  unless yaml_value.is_a?(::String)
    raise Structured::Errors::InvalidValue.new(
      stack,
      "#{stack} expects a string, but found: #{yaml_value.inspect}"
    )
  end
  yaml_value
end