Retrieve the value of one of the InterpolatedStringNodeFlags
flags.
Compile a XStringNode
node
Dispatch enter and leave events for XStringNode
nodes and continue walking the tree.
Inspect a XStringNode
node.
Visit an individual part of a string-like node.
“foo” ^^^^^
Dispatch enter and leave events for InterpolatedXStringNode
nodes and continue walking the tree.
“foo #{bar}” ^^^^^^^^^^^^
‘foo` ^^^^^
Visit a heredoc node that is representing a string.
Returns the octet string representation of the elliptic curve point.
conversion_form specifies how the point is converted. Possible values are:
:compressed
:uncompressed
:hybrid
‘foo #{bar}` ^^^^^^^^^^^^
IO streams for strings, with access similar to IO
; see IO
.
Examples on this page assume that StringIO has been required:
require 'stringio'
Visit a heredoc node that is representing an xstring.
Objects of class Binding
encapsulate the execution context at some particular place in the code and retain this context for future use. The variables, methods, value of self
, and possibly an iterator block that can be accessed in this context are all retained. Binding
objects can be created using Kernel#binding
, and are made available to the callback of Kernel#set_trace_func
and instances of TracePoint
.
These binding objects can be passed as the second argument of the Kernel#eval
method, establishing an environment for the evaluation.
class Demo def initialize(n) @secret = n end def get_binding binding end end k1 = Demo.new(99) b1 = k1.get_binding k2 = Demo.new(-3) b2 = k2.get_binding eval("@secret", b1) #=> 99 eval("@secret", b2) #=> -3 eval("@secret") #=> nil
Binding
objects have no class-specific methods.