serial_preference 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,11 +7,14 @@ module SerialPreference
|
|
7
7
|
def initialize
|
8
8
|
@preference_names_cache = HashWithIndifferentAccess.new
|
9
9
|
@preference_groups = []
|
10
|
+
@definition = false
|
10
11
|
activate_group
|
11
12
|
end
|
12
13
|
|
13
14
|
def draw(&block)
|
15
|
+
@defintion = true
|
14
16
|
instance_exec(&block)
|
17
|
+
@defintion = false
|
15
18
|
end
|
16
19
|
|
17
20
|
def respond_to?(name)
|
@@ -19,7 +22,11 @@ module SerialPreference
|
|
19
22
|
end
|
20
23
|
|
21
24
|
def method_missing(name,*args,&block)
|
22
|
-
|
25
|
+
if @defintion
|
26
|
+
preference(name,args.extract_options!)
|
27
|
+
else
|
28
|
+
super
|
29
|
+
end
|
23
30
|
end
|
24
31
|
|
25
32
|
[:string,:integer,:boolean,:float].each do |dt|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serial_preference
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: 4069385045996576704
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
segments:
|
141
141
|
- 0
|
142
|
-
hash:
|
142
|
+
hash: 4069385045996576704
|
143
143
|
requirements: []
|
144
144
|
rubyforge_project:
|
145
145
|
rubygems_version: 1.8.24
|