Class: Cassandra::Types::Decimal

Inherits:
Cassandra::Type show all
Defined in:
lib/cassandra/types.rb

Instance Method Summary collapse

Methods inherited from Cassandra::Type

#initialize

Constructor Details

This class inherits a constructor from Cassandra::Type

Instance Method Details

#assert(value, message = nil, &block) ⇒ void

This method returns an undefined value.

Asserts that a given value is a BigDecimal

Parameters:

  • value (Object) —

    value to be validated

  • message (String) (defaults to: nil) —

    error message to use when assertion fails

Yield Returns:

  • (String) —

    error message to use when assertion fails

Raises:

  • (ArgumentError) —

    if the value is not a BigDecimal

See Also:



22
23
# File 'lib/cassandra/types.rb', line 22

def assert(value, message = nil, &block)
end

#kind ⇒ Symbol

Returns :decimal.

Returns:

  • (Symbol) —

    :decimal

See Also:



4
5
# File 'lib/cassandra/types.rb', line 4

def kind
end

#new(value) ⇒ BigDecimal

Coerces the value to BigDecimal

Parameters:

  • value (Object) —

    original value

Returns:

  • (BigDecimal) —

    value

See Also:



11
12
# File 'lib/cassandra/types.rb', line 11

def new(value)
end

#to_s ⇒ String

Returns "decimal".

Returns:

  • (String) —

    "decimal"

See Also:



27
28
# File 'lib/cassandra/types.rb', line 27

def to_s
end