Sha256: 9a3c0e6c0e311fc0407821422683b98eb8d23af7ea53ab61a8267ad6483a4981

Contents?: true

Size: 1.52 KB

Versions: 28

Compression:

Stored size: 1.52 KB

Contents

{
  "schema_type": "object",
  "schema_version": "1.0",
  "name": "indent",
  "path": "packages/ree_string/package/ree_string/functions/indent.rb",
  "mount_as": "fn",
  "class": "ReeString::Indent",
  "factory": null,
  "methods": [
    {
      "doc": "Indents the lines in the receiver:\n\n  string = \n  def some_method\n    some_code\n  end\n  indent(string, 2)\n  # =>\n    def some_method\n      some_code\n    end\n\nThe second argument, +indent_string+, specifies which indent string to\nuse. The default is +nil+, which tells the method to make a guess by\npeeking at the first indented line, and fallback to a space if there is\nnone.\n\n  indent(\"  foo\", 2)              # => \"    foo\"\n  indent(\"foo\n\t\tbar\", 2, \"\t\") # => \"\t\tfoo\n\t\t\t\tbar\"\n  indent(\"foo\", 2, \"\t\")          # => \"\t\tfoo\"\n\nWhile +indent_string+ is typically one space or tab, it may be any string.\n\nThe third argument, +empty_lines+, is a flag that says whether\nempty lines should be indented. Default is false.\n\n  indent(\"foo\n\nbar\", 2)                    # => \"  foo\n\n  bar\"\n  indent(\"foo\n\nbar\", 2, empty_lines: true) # => \"  foo\n  \n  bar\"",
      "throws": [

      ],
      "return": "String",
      "args": [
        {
          "arg": "string",
          "type": "String"
        },
        {
          "arg": "amount",
          "type": "Integer"
        },
        {
          "arg": "opts",
          "type": "Ksplat[:indent_string? => String, :empty_lines? => Bool]"
        }
      ]
    }
  ],
  "links": [

  ]
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ree_lib-1.0.32 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.31 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.30 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.29 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.28 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.27 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.26 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.24 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.23 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.22 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.21 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.20 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.19 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.18 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.17 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.16 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.15 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.14 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.13 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.12 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json