Class: Array
- Defined in:
- lib/cocoa/sugarcube-attributedstring/nsattributedstring.rb
Instance Method Summary collapse
-
#join_attrd(connector = nil) ⇒ Object
Detects if any part of an array is an NSAttributedString and joins them Otherwise, just joins the array.
Instance Method Details
#join_attrd(connector = nil) ⇒ Object
Detects if any part of an array is an NSAttributedString and joins them Otherwise, just joins the array.
156 157 158 159 160 161 162 163 |
# File 'lib/cocoa/sugarcube-attributedstring/nsattributedstring.rb', line 156 def join_attrd(connector=nil) joining = "".attrd each_with_index do |attrd_str, index| joining << connector if connector && index > 0 joining << attrd_str end joining end |