reallycare_utils 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,19 +16,14 @@ module ReallycareUtils
16
16
  end
17
17
 
18
18
  define_method("has_#{attribute}_#{value_name}?".to_sym) do
19
- self["#{attribute}"][i] != 0
19
+ (self["#{attribute}"][i] || 0) != 0
20
20
  end
21
21
  end
22
22
 
23
23
  define_method("show_#{attribute}_flags".to_sym) do
24
- val = self["#{attribute}"]
25
- potential_values.map.with_index { |value_name, i| value_name if val[i] == 1 }.compact
24
+ val = self["#{attribute}"] || 0
25
+ values.map.with_index { |value_name, i| value_name if val[i] == 1 }.compact
26
26
  end
27
-
28
- define_method("#{attribute}_includes_one_of?".to_sym) do |mask|
29
- (self["#{attribute}"] | mask) != 0
30
- end
31
-
32
27
  end
33
28
  end
34
29
  end
@@ -1,3 +1,3 @@
1
1
  module ReallycareUtils
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reallycare_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -51,8 +51,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  version: '0'
52
52
  requirements: []
53
53
  rubyforge_project: reallycare_utils
54
- rubygems_version: 1.8.8
54
+ rubygems_version: 1.8.10
55
55
  signing_key:
56
56
  specification_version: 3
57
57
  summary: Shared utilities for ReallyCare sites
58
58
  test_files: []
59
+ has_rdoc: