indented_io 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c36c671ed19295dbc8816818028ce7d561f572c8aacc340c5d84236ce19a1e1e
4
- data.tar.gz: 87b38c79f9ccce609c0a165438f62b2dd5194e1cb00df4b98623856f134019a1
3
+ metadata.gz: 0a3aea4e6d92b93cbbf46b1cedc65269dcf98a0d3e1c004a80326ea42ffbbedd
4
+ data.tar.gz: e6978c9ada704f54f82cbf36cd49d144f99ae8c5e8ae4c6f04a46a0536a95047
5
5
  SHA512:
6
- metadata.gz: b04768c215fa7fd6baf00c6f99915dd43bcaa36db6bb3f8c140f0d43f2cd8b721c246f6cdb1e380e0f8bf718dbcc26961dff665a1163a1eccf5a0395113b9178
7
- data.tar.gz: 8d689f7775d01772ece81d43cc8100d8e7e484c406e61ac84a84b0204a4708cd7436477d8af12c1c3ed3a28b8acfb6938ec24df3f7b9c8b41e9628a6ebe7396b
6
+ metadata.gz: a477fc1cafb6b0f671c167232f9805f548d291f000aff6423ff370e8786e11fc1bfd514730ea054b82518971281e915137ed7ad754300e989da2811810fae7d9
7
+ data.tar.gz: 2a051a896d10d75fe8a0f1d3f5bf38bb6cf4746cd4cad75fbdb578abe2d70ce17db36136bca29f2c4a038608d88df89c5cb5286bd57f8c6e031868bfbaaf285f
data/README.md CHANGED
@@ -149,7 +149,7 @@ the class define a `#write` method with the same semantics as `IO#write`
149
149
  require 'indented_io'
150
150
  class MyIO
151
151
  include IndentedIO::IndentedIOInterface
152
- def writte(*args) ... end
152
+ def write(*args) ... end
153
153
  end
154
154
 
155
155
  my_io = MyIO.new
@@ -53,8 +53,8 @@ module IndentedIO
53
53
  end
54
54
 
55
55
  # Indent and print args to the underlying device. #p has the same semantic
56
- # as Kernel#p. Please note that #p is usually not defined on other classes
57
- # than Kernel but can be used on any IndentedIO object
56
+ # as Kernel#p. Please note that #p is only defined on Kernel in the Ruby core
57
+ # library but can be used on any IndentedIO object
58
58
  def p(*args)
59
59
  if bol
60
60
  args.each { |arg| write(arg.inspect, "\n") }
@@ -69,7 +69,7 @@ module IndentedIO
69
69
  # Make IndentedIO behave like the underlying @device
70
70
  # @!visibility private
71
71
  def respond_to?(method)
72
- [:indent, :level, :print, :puts, :p].include?(method) || device.respond_to?(method)
72
+ [:indent, :level, :print, :printf, :puts, :p].include?(method) || device.respond_to?(method)
73
73
  end
74
74
 
75
75
  # Make IndentedIO behave like the underlying @device
@@ -85,8 +85,8 @@ module IndentedIO
85
85
  attr_reader :device
86
86
 
87
87
  # First IndentedIO object on the stack. Equal to self if self is the first
88
- # indentation object. #base is used to keep track of #bol for the whole
89
- # stack of IndentedIO objects
88
+ # indentation object. The #base object is used to keep track of #bol for
89
+ # the whole stack of IndentedIO objects
90
90
  attr_reader :base
91
91
 
92
92
  # Parent IndentedIO or IO object
@@ -4,6 +4,7 @@ module IndentedIO
4
4
  # #write method like this:
5
5
  #
6
6
  # require 'indented_io'
7
+ #
7
8
  # class MyIO
8
9
  # include IndentedIO::IndentedIOInterface
9
10
  # def write(*args) ... end
@@ -18,7 +19,7 @@ module IndentedIO
18
19
  #
19
20
  module IndentedIOInterface
20
21
  # Returns a IndentedIO object that can be used for printing. The IO object
21
- # will pass-through all method to the underlying device except #print,
22
+ # will pass-through all methods to the underlying device except #print,
22
23
  # #printf, #puts, and #p
23
24
  #
24
25
  # +level+ is the number of leves to indent and +string+ is the string used
@@ -3,7 +3,7 @@ require 'indented_io/indented_io_interface'
3
3
  module Kernel
4
4
  # Like {IndentedIO::IndentedIOInterface#indent} except the underlying device is
5
5
  # not the receiver (Kernel) but $stdout. Kernel#indent also allows a block without
6
- # and argument. In that case it manipulates $stdout to print indented:
6
+ # an argument. In that case it manipulates $stdout to print indented:
7
7
  #
8
8
  # puts "Not indented
9
9
  # indent do
@@ -1,4 +1,4 @@
1
1
  module IndentedIO
2
2
  # Version number
3
- VERSION = '0.8.1'
3
+ VERSION = '0.8.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indented_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-14 00:00:00.000000000 Z
11
+ date: 2018-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler