Results for: "tally"

No documentation available
No documentation available

Emit a scalar with value

Called when an alias is found to anchor. anchor will be the name of the anchor found.

Example

Here we have an example of an array that references itself in YAML:

--- &ponies
- first element
- *ponies

&ponies is the anchor, *ponies is the alias. In this case, alias is called with “ponies”.

Called when a scalar value is found. The scalar may have an anchor, a tag, be implicitly plain or implicitly quoted

value is the string value of the scalar anchor is an associated anchor or nil tag is an associated tag or nil plain is a boolean value quoted is a boolean value style is an integer indicating the string style

See the constants in Psych::Nodes::Scalar for the possible values of style

Example

Here is a YAML document that exercises most of the possible ways this method can be called:

---
- !str "foo"
- &anchor fun
- many
  lines
- |
  many
  newlines

The above YAML document contains a list with four strings. Here are the parameters sent to this method in the same order:

# value               anchor    tag     plain   quoted  style
["foo",               nil,      "!str", false,  false,  3    ]
["fun",               "anchor", nil,    true,   false,  1    ]
["many lines",        nil,      nil,    true,   false,  1    ]
["many\nnewlines\n",  nil,      nil,    false,  true,   4    ]
No documentation available
No documentation available

Emit a scalar with value, anchor, tag, and a plain or quoted string type with style.

See Psych::Handler#scalar

Emit an alias with anchor.

See Psych::Handler#alias

Get the output style, canonical or not.

Set the output style to canonical, or not.

Get the indentation level.

Set the indentation level to level. The level must be less than 10 and greater than 1.

Returns the exit status of the child for which PTY#check raised this exception

The scanner’s state of the current token. This value is the bitwise OR of zero or more of the Ripper::EXPR_* constants.

returns the socket family as an integer.

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").family
#=> 10

returns the cmsg data as a string.

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").data
#=> ""

returns the timestamp as a time object.

ancillarydata should be one of following type:

Returns the destination address of ifaddr. nil is returned if the flags doesn’t have IFF_POINTOPOINT.

Sends the String msg to the source

returns the socket family as an integer.

p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).family
#=> 10

returns the socket option data as a string.

p Socket::Option.new(:INET6, :IPV6, :RECVPKTINFO, [1].pack("i!")).data
#=> "\x01\x00\x00\x00"

return values as an array

Returns true if argument is optional.

tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
param1 = method.params[0]
puts "#{param1.name} #{param1.optional?}" # => Filename true

Returns true if argument is return value.

tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library',
                         'DirectPlayLobbyConnection')
method = WIN32OLE_METHOD.new(tobj, 'GetPlayerShortName')
param = method.params[0]
puts "#{param.name} #{param.retval?}"  # => name true
Search took: 4ms  ·  Total Results: 1206