dalliance 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dalliance.rb +16 -0
- data/lib/dalliance/version.rb +1 -1
- metadata +2 -2
data/lib/dalliance.rb
CHANGED
@@ -111,6 +111,22 @@ module Dalliance
|
|
111
111
|
def dalliance_status_in_load_select_array
|
112
112
|
state_machine(:dalliance_status).states.map {|state| [state.human_name, state.name] }
|
113
113
|
end
|
114
|
+
|
115
|
+
def dalliance_durations
|
116
|
+
self.pluck(self.dalliance_options[:duration_column].to_sym)
|
117
|
+
end
|
118
|
+
|
119
|
+
def average_duration
|
120
|
+
self.average(self.dalliance_options[:duration_column])
|
121
|
+
end
|
122
|
+
|
123
|
+
def min_duration
|
124
|
+
self.minimum(self.dalliance_options[:duration_column])
|
125
|
+
end
|
126
|
+
|
127
|
+
def max_duration
|
128
|
+
self.maximum(self.dalliance_options[:duration_column])
|
129
|
+
end
|
114
130
|
end
|
115
131
|
|
116
132
|
def error_or_completed?
|
data/lib/dalliance/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dalliance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.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-
|
12
|
+
date: 2013-01-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|