Class: Kali::Type::Float

Inherits:
Kali::Type show all
Defined in:
lib/kali/type/float.rb

Overview

Used to represent floating point numbers.

See tools.ietf.org/html/rfc5545#section-3.3.7

Instance Method Summary collapse

Methods inherited from Kali::Type

#decode, #encode, #initialize, #parameters

Constructor Details

This class inherits a constructor from Kali::Type

Instance Method Details

#decode!(string) ⇒ Object



10
11
12
# File 'lib/kali/type/float.rb', line 10

def decode!(string)
  Float(string)
end

#encode!(object) ⇒ Object



6
7
8
# File 'lib/kali/type/float.rb', line 6

def encode!(object)
  Float(object).to_s
end