Class: Numeric
- Defined in:
- lib/ethereum/core_ext/object/truth.rb,
lib/ethereum/core_ext/numeric/denominations.rb
Constant Summary collapse
- BABBAGE =
10**3
- LOVELACE =
10**6
- SHANNON =
10**9
- SZABO =
10**12
- FINNEY =
10**15
- ETHER =
10**18
- TURING =
2**256
Instance Method Summary collapse
- #babbage ⇒ Object
- #ether ⇒ Object
- #false? ⇒ Boolean
- #finney ⇒ Object
- #lovelace ⇒ Object
- #shannon ⇒ Object
- #szabo ⇒ Object
- #turing ⇒ Object
- #wei ⇒ Object
Instance Method Details
#babbage ⇒ Object
17 18 19 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 17 def babbage self * BABBAGE end |
#ether ⇒ Object
37 38 39 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 37 def ether self * ETHER end |
#false? ⇒ Boolean
44 45 46 |
# File 'lib/ethereum/core_ext/object/truth.rb', line 44 def false? self == 0 end |
#finney ⇒ Object
33 34 35 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 33 def finney self * FINNEY end |
#lovelace ⇒ Object
21 22 23 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 21 def lovelace self * LOVELACE end |
#shannon ⇒ Object
25 26 27 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 25 def shannon self * SHANNON end |
#szabo ⇒ Object
29 30 31 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 29 def szabo self * SZABO end |
#turing ⇒ Object
41 42 43 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 41 def turing self * TURING end |
#wei ⇒ Object
13 14 15 |
# File 'lib/ethereum/core_ext/numeric/denominations.rb', line 13 def wei self end |