zh_kostev_ext 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -82,7 +82,26 @@ Example
82
82
  a[:misha] will return 'Misha'
83
83
  a[:vladimir] will return 'Vlad'(because this value set manually)
84
84
 
85
+ == In True class
85
86
 
87
+ ===== human #return humanized value('Yes')
88
+ Example
89
+ a = true
90
+ a.human = 'Yes'
91
+
92
+ == In False class
93
+
94
+ ===== human #return humanized value('No')
95
+ Example
96
+ a = false
97
+ a.human = 'No'
98
+
99
+ == In Nil class
100
+
101
+ ===== human #return humanized value('No')
102
+ Example
103
+ a = nil
104
+ a.human = 'No'
86
105
 
87
106
 
88
107
  == Contributing to zh_kostev_ext
@@ -0,0 +1,15 @@
1
+ module RubyClassesExtensions
2
+ module FalseClassExtensions
3
+ def self.included(base)
4
+ base.class_eval do
5
+ #return humanized value('No')
6
+ #example
7
+ # a = false
8
+ # a.human = 'No'
9
+ def human
10
+ 'No'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module RubyClassesExtensions
2
+ module NilClassExtensions
3
+ def self.included(base)
4
+ base.class_eval do
5
+ #return humanized value('No')
6
+ #example
7
+ # a = nil
8
+ # a.human = 'No'
9
+ def human
10
+ 'No'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module RubyClassesExtensions
2
+ module TrueClassExtensions
3
+ def self.included(base)
4
+ base.class_eval do
5
+ #return humanized value('Yes')
6
+ #example
7
+ # a = true
8
+ # a.human = 'Yes'
9
+ def human
10
+ 'Yes'
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
data/lib/zh_kostev_ext.rb CHANGED
@@ -11,3 +11,18 @@ require "ruby_classes_extensions/hash_extensions"
11
11
  class Hash
12
12
  include RubyClassesExtensions::HashExtensions
13
13
  end
14
+
15
+ require "ruby_classes_extensions/true_class_extensions"
16
+ class TrueClass
17
+ include RubyClassesExtensions::TrueClassExtensions
18
+ end
19
+
20
+ require "ruby_classes_extensions/false_class_extensions"
21
+ class FalseClass
22
+ include RubyClassesExtensions::FalseClassExtensions
23
+ end
24
+
25
+ require "ruby_classes_extensions/nil_class_extensions"
26
+ class NilClass
27
+ include RubyClassesExtensions::NilClassExtensions
28
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zh_kostev_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-07 00:00:00.000000000 Z
12
+ date: 2013-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spreadsheet
@@ -136,7 +136,10 @@ files:
136
136
  - lib/controller_extensions/export_to_excel.rb
137
137
  - lib/controller_extensions/general_methods.rb
138
138
  - lib/controller_extensions/url_ext.rb
139
+ - lib/ruby_classes_extensions/false_class_extensions.rb
139
140
  - lib/ruby_classes_extensions/hash_extensions.rb
141
+ - lib/ruby_classes_extensions/nil_class_extensions.rb
142
+ - lib/ruby_classes_extensions/true_class_extensions.rb
140
143
  - lib/zh_kostev_ext.rb
141
144
  - LICENSE.txt
142
145
  - README.rdoc
@@ -155,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
158
  version: '0'
156
159
  segments:
157
160
  - 0
158
- hash: 4217705574523471923
161
+ hash: -257046175
159
162
  required_rubygems_version: !ruby/object:Gem::Requirement
160
163
  none: false
161
164
  requirements:
@@ -164,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
167
  version: '0'
165
168
  requirements: []
166
169
  rubyforge_project:
167
- rubygems_version: 1.8.24
170
+ rubygems_version: 1.8.21
168
171
  signing_key:
169
172
  specification_version: 3
170
173
  summary: Some usefull method container