bootstripe 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bootstripe/number_additions.rb +3 -3
- data/lib/bootstripe/version.rb +1 -1
- metadata +4 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
class Numeric
|
2
|
-
def to_period(
|
2
|
+
def to_period(detailed = true)
|
3
3
|
total_seconds = self.to_i
|
4
4
|
|
5
5
|
days = total_seconds / 86400
|
@@ -17,11 +17,11 @@ class Numeric
|
|
17
17
|
display = display + display_concat + "#{hours}h"
|
18
18
|
display_concat = ' '
|
19
19
|
end
|
20
|
-
if minutes > 0 and (
|
20
|
+
if minutes > 0 and (detailed or days == 0)
|
21
21
|
display = display + display_concat + "#{minutes}m"
|
22
22
|
display_concat = ' '
|
23
23
|
end
|
24
|
-
if seconds > 0 and (
|
24
|
+
if seconds > 0 and (detailed or (days == 0 and hours == 0))
|
25
25
|
display = display + display_concat + "#{seconds}s"
|
26
26
|
end
|
27
27
|
display
|
data/lib/bootstripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70107993577100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70107993577100
|
25
25
|
description: A handful of useful additions for Ruby
|
26
26
|
email:
|
27
27
|
- mike@bytebin.com
|