class Nem::Unit::Version
@attr [String] value
Constants
- MAINNET
- MASK_NETWORK
- MASK_VERSION
- MIJIN
- TESTNET
Attributes
value[RW]
Public Class Methods
new(value)
click to toggle source
# File lib/nem/unit/version.rb, line 14 def initialize(value) @value = value end
Public Instance Methods
==(other)
click to toggle source
@return [Boolean]
# File lib/nem/unit/version.rb, line 45 def ==(other) version == other end
network()
click to toggle source
@return [Integer]
# File lib/nem/unit/version.rb, line 24 def network @network ||= value & MASK_NETWORK end
to_i()
click to toggle source
@return [Integer]
# File lib/nem/unit/version.rb, line 40 def to_i value.to_i end
to_s()
click to toggle source
@return [String]
# File lib/nem/unit/version.rb, line 35 def to_s to_i.to_s end
version()
click to toggle source
@return [Integer]
# File lib/nem/unit/version.rb, line 19 def version @version ||= value & MASK_VERSION end