class Restspec::Schema::Types::StringType
Public Instance Methods
example_for(attribute)
click to toggle source
Generates a random word.
@param attribute [Restspec::Schema::Attribute] the atribute of the schema.
@return [String] A random word.
# File lib/restspec/schema/types/string_type.rb, line 8 def example_for(attribute) Faker::Lorem.word end
valid?(attribute, value)
click to toggle source
@param attribute [Restspec::Schema::Attribute] the atribute of the schema. @param value [Object] the value of the attribute.
@return [true, false] If the value is a string.
# File lib/restspec/schema/types/string_type.rb, line 16 def valid?(attribute, value) value.is_a?(String) end