lib/vedeu/geometries/position.rb in vedeu-0.7.3 vs lib/vedeu/geometries/position.rb in vedeu-0.7.4
- old
+ new
@@ -109,13 +109,14 @@
# Return the escape sequence required to position the cursor at
# a particular point on the screen. When passed a block, will do
# the aforementioned, call the block and then reposition to this
# location.
#
+ # @param block [Proc]
# @return [String]
# @yieldreturn [String] Returns the block wrapped in position
# escape sequences.
- def to_s
+ def to_s(&block)
return "#{sequence}#{yield}".freeze if block_given?
sequence
end
alias_method :to_str, :to_s