Extended Fixum class with empty? to have an easier content validation.
This commit is contained in:
parent
8f8bfb60b8
commit
828cdd0347
1 changed files with 17 additions and 0 deletions
17
lib/core_ext/fixnum.rb
Normal file
17
lib/core_ext/fixnum.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
class Fixnum
|
||||
|
||||
=begin
|
||||
|
||||
result = 5.empty?
|
||||
|
||||
result
|
||||
|
||||
false
|
||||
|
||||
=end
|
||||
|
||||
def empty?
|
||||
false
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue