Class: String

### Home Classes Methods

### In Files

- lib/templater/core_ext/string.rb

### Parent

Object

### Methods

- #realign_indentation
- #to_lines

### Files

- History.txt
- Manifest.txt

### Class/Module Index

Quicksearch

- Templater
- Templater::ActionDescription
- Templater::Actions
- Templater::Actions::Action
- Templater::Actions::Directory
- Templater::Actions::EmptyDirectory
- Templater::Actions::File
- Templater::Actions::Template
- Templater::ArgumentDescription
- Templater::CLI
- Templater::CLI::Generator
- Templater::CLI::Manifold
- Templater::Description
- Templater::Discovery
- Templater::Generator
- Templater::InvocationDescription
- Templater::Manifold
- Templater::Spec
- Templater::Spec::Helpers
- Templater::Spec::Helpers::CreateMatcher
- Templater::Spec::Helpers::InvokeMatcher
- Kernel
- String

No matching classes.

# String

### Public Instance Methods

realign_indentation() click to toggle source

    # File lib/templater/core_ext/string.rb, line 3
    def realign_indentation
      basis = self.index(/\S/) # find the first non-whitespace character
      return self.to_lines.map { |s| s[basis..-1] }.join
    end

to_lines() click to toggle source

    # File lib/templater/core_ext/string.rb, line 9
    def to_lines
      lines.to_a
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.