tapper 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 2ee8004fcc78added957db525abb922976b3e594
4
- data.tar.gz: 414bb32db8dabf5cf4927f7afc5aef732d981046
3
+ metadata.gz: 686b5b9d1736e360cbde35bb0390921320b725e0
4
+ data.tar.gz: b4696b2dba3112fb01b9c09271cde0050a7a09a1
5
5
  SHA512:
6
- metadata.gz: aefa519fc683e8ef8c3c607f21349b33c95b60aa377c59521f3de713fb18af0c4dce6111ac98bb68f6ac96fe139da070fdde11acbbe48b57ea9670ebb5b85fb4
7
- data.tar.gz: 35f86a2ec0cdbb3b9bc0223244236b9508259f8c018aa2430bc449f2b8b1eaffb0212fc97eb0c502bd0616c238f7dd406f7c86003c90368631b0586c84576fc1
6
+ metadata.gz: f453bd2d92021a34592c9e35a484640096bede5ec65f488bc79d481f2accfecfd782530aa3fc2224a54ebe4967c8c70215227373012ff773af0b5dc8c09b0c44
7
+ data.tar.gz: 3a394e052381b59e559a68e8b1f8e5a0410ac3ccb1fa9e380d0ec0afdc355d1605e6bcb6a2ad8f20d4142987556c7b13439593236a33543027a4898b925e8ac6
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Tapper
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tapper`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Build Status](https://travis-ci.org/y-yagi/tapper.svg?branch=master)](https://travis-ci.org/y-yagi/tapper)
4
+ [![Gem Version](https://badge.fury.io/rb/tapper.svg)](http://badge.fury.io/rb/tapper)
5
+
6
+ `Tapper` taps the invocation of the public method. This means that all methods can be used with chain.
4
7
 
5
- TODO: Delete this and the text above, and describe your gem
6
8
 
7
9
  ## Installation
8
10
 
@@ -22,7 +24,27 @@ Or install it yourself as:
22
24
 
23
25
  ## Usage
24
26
 
25
- TODO: Write usage instructions here
27
+ ```ruby
28
+ class User
29
+ attr_accessor :name, :gender
30
+
31
+ include Tapper
32
+
33
+ def taro
34
+ self.name = "taro"
35
+ end
36
+
37
+ def man
38
+ self.gender = :man
39
+ end
40
+ end
41
+ ```
42
+
43
+ ```ruby
44
+ user = User.new.taro.man
45
+ user.name # => "taro"
46
+ ```
47
+
26
48
 
27
49
  ## Development
28
50
 
@@ -40,4 +62,4 @@ The gem is available as open source under the terms of the [MIT License](http://
40
62
 
41
63
  ## Code of Conduct
42
64
 
43
- Everyone interacting in the Tapper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tapper/blob/master/CODE_OF_CONDUCT.md).
65
+ Everyone interacting in the Tapper project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/y-yagi/tapper/blob/master/CODE_OF_CONDUCT.md).
@@ -7,7 +7,7 @@ module Tapper
7
7
 
8
8
  module ClassMethods
9
9
  def method_added(name)
10
- return if private_method_defined?(name) || /_tap/.match?(name.to_s) || method_defined?("#{name}_without_tap")
10
+ return if private_method_defined?(name) || /_tap/.match(name.to_s) || method_defined?("#{name}_without_tap")
11
11
 
12
12
  method = <<-EOS
13
13
  def #{name}_tap
@@ -1,3 +1,3 @@
1
1
  module Tapper
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Yaginuma
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-13 00:00:00.000000000 Z
11
+ date: 2017-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler