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.83 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.82 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.81 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.80 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.79 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.78 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.77 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.76 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.75 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.74 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.73 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.72 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.71 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.70 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.69 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.68 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.67 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.66 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.65 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json
ree_lib-1.0.64 lib/ree_lib/packages/ree_string/schemas/ree_string/functions/indent.schema.json