Class: Mountapi::Schema::String

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/mountapi/schema/string.rb

Overview

Schema implementation for String type

Instance Method Summary collapse

Methods included from Base

included

Instance Method Details

#cast(value) ⇒ Object

cast value to string



10
11
12
13
# File 'lib/mountapi/schema/string.rb', line 10

def cast(value)
  raise_cast_error(value) unless value.is_a?(::String)
  value.to_s
end