Sha256: 51b068a47ce5e926b0c0910e156ebcabd38a748c130ee5d6843e05501fd629b6

Contents?: true

Size: 1.6 KB

Versions: 71

Compression:

Stored size: 1.6 KB

Contents

{
  "schema_type": "object",
  "schema_version": "1.1",
  "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",
          "arg_type": "req",
          "type": "String"
        },
        {
          "arg": "amount",
          "arg_type": "req",
          "type": "Integer"
        },
        {
          "arg": "opts",
          "arg_type": "keyrest",
          "type": "Ksplat[:indent_string? => String, :empty_lines? => Bool]"
        }
      ]
    }
  ],
  "links": [

  ]
}

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
ree_lib-1.0.103 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.102 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.101 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.100 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.99 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.98 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.97 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.96 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.95 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.94 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.93 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.92 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.91 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.90 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.89 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.88 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.87 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.86 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.85 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.84 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json