Class: Bitcoin::Descriptor::Raw
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Expression
#==, #compressed_key?, #derive_path, #extract_pubkey, #to_hex, #to_s
Constructor Details
#initialize(hex) ⇒ Raw
9
10
11
12
13
|
# File 'lib/bitcoin/descriptor/raw.rb', line 9
def initialize(hex)
raise ArgumentError, "Raw script must be string." unless hex.is_a?(String)
raise ArgumentError, "Raw script is not hex." unless hex.valid_hex?
@hex = hex
end
|
Instance Attribute Details
#hex ⇒ Object
Returns the value of attribute hex.
5
6
7
|
# File 'lib/bitcoin/descriptor/raw.rb', line 5
def hex
@hex
end
|
Instance Method Details
#args ⇒ Object
23
24
25
|
# File 'lib/bitcoin/descriptor/raw.rb', line 23
def args
hex
end
|
#top_level? ⇒ Boolean
27
28
29
|
# File 'lib/bitcoin/descriptor/raw.rb', line 27
def top_level?
true
end
|
#type ⇒ Object
15
16
17
|
# File 'lib/bitcoin/descriptor/raw.rb', line 15
def type
:raw
end
|