Class: DBus::Data::Double
Overview
Double-precision floating point number.
Constant Summary collapse
- FORMAT =
Format.new("E", "G")
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ Double
constructor
A new instance of Double.
Methods inherited from Fixed
Methods inherited from Basic
basic?, from_typed, type, #type
Methods inherited from Base
#==, assert_type_matches_class, basic?, #eql?, fixed?, from_typed, #type
Constructor Details
#initialize(value) ⇒ Double
Returns a new instance of Double.
391 392 393 394 395 |
# File 'lib/dbus/data.rb', line 391 def initialize(value) value = value.value if value.is_a?(self.class) value = Kernel.Float(value) super(value) end |
Class Method Details
.alignment ⇒ Object
380 381 382 |
# File 'lib/dbus/data.rb', line 380 def self.alignment 8 end |
.format ⇒ Object
385 386 387 |
# File 'lib/dbus/data.rb', line 385 def self.format FORMAT end |
.type_code ⇒ Object
376 377 378 |
# File 'lib/dbus/data.rb', line 376 def self.type_code "d" end |