Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/core_ext.rb
Constant Summary collapse
- BLANK_RE =
/\A[[:space:]]*\z/
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
4 5 6 |
# File 'lib/core_ext.rb', line 4 def blank? empty? || BLANK_RE === self || self == "\u001A" end |
#enquote ⇒ Object
16 17 18 |
# File 'lib/core_ext.rb', line 16 def enquote "\"#{to_s}\"" end |
#indent(spaces = 2) ⇒ Object
8 9 10 |
# File 'lib/core_ext.rb', line 8 def indent(spaces = 2) lines.map { |line| " " * spaces + line }.join end |
#inline_dcm ⇒ Object
12 13 14 |
# File 'lib/core_ext.rb', line 12 def inline_dcm "KONSERVIERUNG_FORMAT 2.0\n\n" + self end |