shiritori 0.1.6 → 0.1.7

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: 210de60ebae0c8b80e6f0c8195f12ef3a6339c25
4
- data.tar.gz: 38148907162c13381d5394651a52571af46967d3
3
+ metadata.gz: 15306fc6b5e758835b251847186d047d17f5a097
4
+ data.tar.gz: 670e46f10cde90c3cf71be56db9754f702e7778d
5
5
  SHA512:
6
- metadata.gz: 215cf4485ece83ae8b88ccc5065eb5797618368f77fe309636114b2a66ee4d209a554bb76dedaa9c6bde795785b8d09781585b9733be98cfcf565c446aa1582b
7
- data.tar.gz: 21254ab6c0fe3b04dae92283a21c92e878a6a5833612c84a31a7d851c3e27f114f53b98398c0715484fa37e6998db28d0af79647360a5661048acf3cc663a916
6
+ metadata.gz: 7909844236da3afcf8f0b4e52fd46b3a43e5e1db968062b6ae76712e883fc36b11448ca9f247ef530e83da51812e08232cde009cfe9024b9e206c721830b5aad
7
+ data.tar.gz: 87cc9b4e7551c9ffbd1895710a0a9c48474d26942b4e50fb137eb69e0232b147a8d4129ab40a4d862cd086e1dfcb2e24e4d7cfb4a1ef327fba52f97a273df1b6
data/README.md CHANGED
@@ -46,7 +46,13 @@ Exec command 3.+(5)
46
46
  ## Usage
47
47
 
48
48
  ```
49
- % shiritori
49
+ % shiritori start
50
+
51
+ +--------------------------------------------------+
52
+ | |
53
+ | Welcome to the Shiritori! |
54
+ | |
55
+ +--------------------------------------------------+
50
56
  Please input first object > "Hello"
51
57
 
52
58
  +----------------------+
@@ -55,11 +61,11 @@ Please input first object > "Hello"
55
61
  | "Hello" |
56
62
  +----------------------+
57
63
 
58
- +---------------+----------------+
59
- | Current Class | Current Object |
60
- +---------------+----------------+
61
- | String | "Hello" |
62
- +---------------+----------------+
64
+ +---------------+-------------+----------------+
65
+ | Current Class | Chain Count | Current Object |
66
+ +---------------+-------------+----------------+
67
+ | String | 0 | "Hello" |
68
+ +---------------+-------------+----------------+
63
69
 
64
70
  Please input next method > chars
65
71
  Exec command "Hello".chars
@@ -70,11 +76,13 @@ Exec command "Hello".chars
70
76
  | "Hello".chars |
71
77
  +----------------------+
72
78
 
73
- +---------------+---------------------------+
74
- | Current Class | Current Object |
75
- +---------------+---------------------------+
76
- | Array | ["H", "e", "l", "l", "o"] |
77
- +---------------+---------------------------+
79
+ +---------------+-------------+---------------------------+
80
+ | Current Class | Chain Count | Current Object |
81
+ +---------------+-------------+---------------------------+
82
+ | Array | 1 | ["H", "e", "l", "l", "o"] |
83
+ +---------------+-------------+---------------------------+
84
+
85
+ Success!
78
86
 
79
87
  Please input next method > first
80
88
  Exec command ["H", "e", "l", "l", "o"].first
@@ -85,11 +93,13 @@ Exec command ["H", "e", "l", "l", "o"].first
85
93
  | "Hello".chars.first |
86
94
  +----------------------+
87
95
 
88
- +---------------+----------------+
89
- | Current Class | Current Object |
90
- +---------------+----------------+
91
- | String | "H" |
92
- +---------------+----------------+
96
+ +---------------+-------------+----------------+
97
+ | Current Class | Chain Count | Current Object |
98
+ +---------------+-------------+----------------+
99
+ | String | 2 | "H" |
100
+ +---------------+-------------+----------------+
101
+
102
+ Success!
93
103
 
94
104
  Please input next method >
95
105
  ```
@@ -11,15 +11,11 @@ module Shiritori
11
11
  @method_list - UNUSE_METHOD
12
12
  end
13
13
 
14
- def singleton(klass)
15
- class << klass; self end
16
- end
17
-
18
14
  def scan_method(klass = BasicObject)
19
15
  @check_list[klass] = true
20
16
  @method_list |= klass.instance_methods
21
17
 
22
- ObjectSpace.each_object(singleton(klass)) do |subclass|
18
+ ObjectSpace.each_object(Class) do |subclass|
23
19
  scan_method(subclass) if klass != subclass && @check_list[subclass].nil?
24
20
  end
25
21
  end
@@ -1,3 +1,3 @@
1
1
  module Shiritori
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiritori
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - siman-man
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-21 00:00:00.000000000 Z
11
+ date: 2016-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.4.5
183
+ rubygems_version: 2.5.1
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: shiritori