method

first?

Importance_1

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_1_10) is shown here.

These similar methods exist in v2_5_5:

first?() public

first? is a predicate to test the call is a first call to first? with current group.

It is useful to format comma separated values as:

q.group(1, '[', ']') {
  xxx.each {|yyy|
    unless q.first?
      q.text ','
      q.breakable
    end
    ... pretty printing yyy ...
  }
}

first? is obsoleted in 1.8.2.

Show source
Register or log in to add new notes.