Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/prawn/compatibility.rb
Overview
Why would we ever use Ruby 1.8.7 when we can backport with something as simple as this?
Direct Known Subclasses
Instance Method Summary collapse
- #each_char ⇒ Object
-
#first_line ⇒ Object
:nodoc:.
Instance Method Details
#each_char ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/prawn/compatibility.rb', line 14 def each_char # copied from jcode if block_given? scan(/./m) { |x| yield x } else scan(/./m) end end |
#first_line ⇒ Object
:nodoc:
7 8 9 |
# File 'lib/prawn/compatibility.rb', line 7 def first_line self.each_line { |line| return line } end |