pry-pretty-numeric 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in pry-pretty-numeric.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
1
+ class Pry
2
+ module PrettyNumeric
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ require "pry-pretty-numeric/version"
2
+ require "pp"
3
+
4
+ class Numeric
5
+ def pretty_inspect
6
+ integral, fractional = super.split('.', 2)
7
+ integral = integral.reverse.gsub(/.{3}(?!$)/, '\&_').reverse
8
+ fractional = fractional.gsub(/.{3}/, '\&_') if fractional
9
+ [integral, fractional].compact.join('.')
10
+ end
11
+ end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "pry-pretty-numeric/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "pry-pretty-numeric"
7
+ s.version = Pry::PrettyNumeric::VERSION
8
+ s.authors = ["Genki Takiuchi"]
9
+ s.email = ["genki@s21g.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Prints numeric with '_' between each 3 digits}
12
+ s.description = %q{See summary}
13
+
14
+ s.rubyforge_project = "pry-pretty-numeric"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ # s.add_runtime_dependency "rest-client"
24
+ s.add_runtime_dependency "pry"
25
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pry-pretty-numeric
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Genki Takiuchi
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-01-24 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: pry
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ description: See summary
35
+ email:
36
+ - genki@s21g.com
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - .gitignore
45
+ - Gemfile
46
+ - Rakefile
47
+ - lib/pry-pretty-numeric.rb
48
+ - lib/pry-pretty-numeric/version.rb
49
+ - pry-pretty-numeric.gemspec
50
+ homepage: ""
51
+ licenses: []
52
+
53
+ post_install_message:
54
+ rdoc_options: []
55
+
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 3
64
+ segments:
65
+ - 0
66
+ version: "0"
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
75
+ version: "0"
76
+ requirements: []
77
+
78
+ rubyforge_project: pry-pretty-numeric
79
+ rubygems_version: 1.8.6
80
+ signing_key:
81
+ specification_version: 3
82
+ summary: Prints numeric with '_' between each 3 digits
83
+ test_files: []
84
+
85
+ has_rdoc: