instance method indentation

Ruby on Rails 7.2.3

Since v6.0.6 Private — implementation detail, not part of the public API

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

indentation()

Returns a string corresponding to the current indentation level (i.e. 2 * @indentation spaces). See also #with_indentation, which can be used to manage the indentation level.

Source
# File railties/lib/rails/generators/actions.rb, line 496
        def indentation # :doc:
          "  " * @indentation
        end

Defined in railties/lib/rails/generators/actions.rb line 496 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::Actions

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close