Class: Bitcoin::Descriptor::ScriptExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/bitcoin/descriptor/script_expression.rb

Direct Known Subclasses

Sh, Wsh

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Expression

#==, #compressed_key?, #derive_path, #extract_pubkey, #to_hex, #to_s, #to_script, #top_level?, #type

Constructor Details

#initialize(script) ⇒ ScriptExpression

Returns a new instance of ScriptExpression.



7
8
9
10
# File 'lib/bitcoin/descriptor/script_expression.rb', line 7

def initialize(script)
  validate!(script)
  @script = script
end

Instance Attribute Details

#scriptObject (readonly)

Returns the value of attribute script.



5
6
7
# File 'lib/bitcoin/descriptor/script_expression.rb', line 5

def script
  @script
end

Instance Method Details

#argsObject



12
13
14
# File 'lib/bitcoin/descriptor/script_expression.rb', line 12

def args
  script.to_s
end