This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

pos

        # StringScanner.pos

(from ruby core)
---
    pos()

---

Returns the byte position of the scan pointer.  In the 'reset' position,
this value is zero.  In the 'terminated' position (i.e. the string is
exhausted), this value is the bytesize of the string.

In short, it's a 0-based index into bytes of the string.

    s = StringScanner.new('test string')
    s.pos               # -> 0
    s.scan_until /str/  # -> "test str"
    s.pos               # -> 8
    s.terminate         # -> #<StringScanner fin>
    s.pos               # -> 11



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.