class Acfs::Resource::Attributes::String

@api public

String attribute type. Use it in your model as an attribute type:

@example

class User < Acfs::Resource
  attribute :name, :string
end

Public Instance Methods

cast_value(value) click to toggle source

@api public

Cast given object to string.

@param [Object] value Object to cast. @return [String] Casted string.

# File lib/acfs/resource/attributes/string.rb, line 22
def cast_value(value)
  value.to_s
end