class Nis::Unit::Version
@attr [String] value
Constants
- MAINNET
- TESTNET
Attributes
value[RW]
Public Class Methods
new(value)
click to toggle source
# File lib/nis/unit/version.rb, line 9 def initialize(value) @value = value end
Public Instance Methods
==(other)
click to toggle source
@return [Boolean]
# File lib/nis/unit/version.rb, line 31 def ==(other) @value == other.value end
mainnet?()
click to toggle source
@return [Boolean]
# File lib/nis/unit/version.rb, line 14 def mainnet? @value == MAINNET end
testnet?()
click to toggle source
@return [Boolean]
# File lib/nis/unit/version.rb, line 19 def testnet? @value == TESTNET end
to_s()
click to toggle source
@return [String]
# File lib/nis/unit/version.rb, line 24 def to_s testnet? ? 'testnet' : mainnet? ? 'mainnet' : 'unexpected' end