string-indent 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/string/indent.rb +6 -0
  3. metadata +43 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 202a714a9f552ee877a9a21be50ec8518c089867efe29f3ab6b276e2b524703e
4
+ data.tar.gz: d8f7630a5da70020d8870372dd042ee16aa5676d1c03638da85a4b269c3188be
5
+ SHA512:
6
+ metadata.gz: 9d4a145fe2aa030b0d466d77ce547a02b1b2a3e760af78492c72d9a6ef0f3b17ad6c547431708d95550018264fec611ecfb49d8ea65f460e3b419bd21d8d8c13
7
+ data.tar.gz: 851f33f623f0e037360506bc464ae83fb710856d1ad9811a0392fb6f8c98c1d696d52d5de855e71f9a945977a4821aaf9afa2b920a157ca2cc29e1113559ccb1
@@ -0,0 +1,6 @@
1
+ class String
2
+ def indent number_of_chars, char = ' '
3
+ indentation = char * number_of_chars
4
+ lines.map { |line| "#{indentantation}#{line}" }.join
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: string-indent
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Anatoly Chernow
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-04-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/string/indent.rb
20
+ homepage:
21
+ licenses: []
22
+ metadata: {}
23
+ post_install_message:
24
+ rdoc_options: []
25
+ require_paths:
26
+ - lib
27
+ required_ruby_version: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: '0'
32
+ required_rubygems_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ requirements: []
38
+ rubyforge_project:
39
+ rubygems_version: 2.7.6
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: String#indent
43
+ test_files: []