Class: Blockchain::Transaction::Output
- Inherits:
-
Object
- Object
- Blockchain::Transaction::Output
- Defined in:
- lib/transaction.rb
Instance Attribute Summary collapse
-
#addr ⇒ Object
readonly
Returns the value of attribute addr.
-
#n ⇒ Object
readonly
Returns the value of attribute n.
-
#script ⇒ Object
readonly
Returns the value of attribute script.
-
#spent ⇒ Object
readonly
Returns the value of attribute spent.
-
#tx_index ⇒ Object
readonly
Returns the value of attribute tx_index.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(o) ⇒ Output
constructor
A new instance of Output.
Constructor Details
#initialize(o) ⇒ Output
53 54 55 56 |
# File 'lib/transaction.rb', line 53 def initialize(o) o.each_key { |k| instance_variable_set"@#{k}", o[k] } @value = Btc.from_satoshis(@value) end |
Instance Attribute Details
#addr ⇒ Object (readonly)
Returns the value of attribute addr.
51 52 53 |
# File 'lib/transaction.rb', line 51 def addr @addr end |
#n ⇒ Object (readonly)
Returns the value of attribute n.
51 52 53 |
# File 'lib/transaction.rb', line 51 def n @n end |
#script ⇒ Object (readonly)
Returns the value of attribute script.
51 52 53 |
# File 'lib/transaction.rb', line 51 def script @script end |
#spent ⇒ Object (readonly)
Returns the value of attribute spent.
51 52 53 |
# File 'lib/transaction.rb', line 51 def spent @spent end |
#tx_index ⇒ Object (readonly)
Returns the value of attribute tx_index.
51 52 53 |
# File 'lib/transaction.rb', line 51 def tx_index @tx_index end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
51 52 53 |
# File 'lib/transaction.rb', line 51 def type @type end |