Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/front_matter/core/array.rb
Instance Method Summary collapse
Instance Method Details
#unindent ⇒ Object
2 3 4 5 |
# File 'lib/front_matter/core/array.rb', line 2 def unindent indent = select {|line| !line.strip.empty? }.map {|line| line.index(/[^\s]/) }.compact.min || 0 map {|line| line.gsub(/^[[:blank:]]{#{indent}}/, '')} end |