Class: Clive::Type::Object

Inherits:
Clive::Type show all
Defined in:
lib/clive/type/definitions.rb

Overview

Basic object, all arguments are valid and will simply return themselves.

Instance Method Summary collapse

Methods inherited from Clive::Type

cast, find_class, match, refute, typecast, valid?

Instance Method Details

#typecast(arg) ⇒ Object

Cast the arg (String) to the correct type.

Parameters:

  • arg (String)

    The value to be cast



20
21
22
# File 'lib/clive/type/definitions.rb', line 20

def typecast(arg)
  arg
end

#valid?(arg) ⇒ Boolean

Test the value to see if it is a valid value for this Tyoe.

Parameters:

  • arg (String)

    The value to be tested

Returns:



14
15
16
# File 'lib/clive/type/definitions.rb', line 14

def valid?(arg)
  true
end