Class: OsuRuby::Database::Datatype::Decimal
- Inherits:
-
Struct
- Object
- Struct
- OsuRuby::Database::Datatype::Decimal
- Defined in:
-
(osu-ruby2 0.0.2) osu-ruby2/database/datatype.rb
(osu-ruby2 0.0.2) osu-ruby2/database/datatype.rb
Instance Attribute Summary collapse
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#hi ⇒ Object
Returns the value of attribute hi.
-
#low ⇒ Object
Returns the value of attribute low.
-
#med ⇒ Object
Returns the value of attribute med.
Class Method Summary collapse
-
.read_bytes(string) ⇒ Decimal
reads back the byte format that is created through #to_bytes.
- .try_convert(value) ⇒ Decimal
Instance Method Summary collapse
-
#split ⇒ (Integer, Integer)
splits integral and decimal part.
-
#to_bytes ⇒ String
Converts the struct into 16-bytes of string.
- #to_d ⇒ BigDecimal
- #to_f ⇒ Float
- #to_i ⇒ Integer
- #to_int ⇒ Integer
- #to_r ⇒ Rational
- #to_s ⇒ String
Instance Attribute Details
#flags ⇒ Object
Returns the value of attribute flags
#hi ⇒ Object
Returns the value of attribute hi
#low ⇒ Object
Returns the value of attribute low
#med ⇒ Object
Returns the value of attribute med
Class Method Details
.read_bytes(string) ⇒ Decimal
reads back the byte format that is created through #to_bytes
Instance Method Details
#split ⇒ (Integer, Integer)
splits integral and decimal part
#to_bytes ⇒ String
Converts the struct into 16-bytes of string.