qor_dsl 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/qor_dsl/config.rb +1 -1
- data/lib/qor_dsl/node.rb +0 -5
- data/qor_dsl.gemspec +1 -1
- metadata +2 -2
data/lib/qor_dsl/config.rb
CHANGED
@@ -30,7 +30,7 @@ module Qor
|
|
30
30
|
config = __children['#{type}'.to_sym]
|
31
31
|
node = Qor::Dsl::Node.new(name)
|
32
32
|
node.add_config(config)
|
33
|
-
node.data =
|
33
|
+
node.data = data
|
34
34
|
node.block = blk
|
35
35
|
__node.add_child(node)
|
36
36
|
node.config.instance_eval(&blk) if block_given? && (config.__children.size > 0)
|
data/lib/qor_dsl/node.rb
CHANGED
@@ -73,17 +73,12 @@ module Qor
|
|
73
73
|
((config.__children.size > 0 || block.nil?) ? (options[:value] || name) : block.call) || default_value
|
74
74
|
end
|
75
75
|
|
76
|
-
def data
|
77
|
-
Array(@data).compact
|
78
|
-
end
|
79
|
-
|
80
76
|
def default_options
|
81
77
|
config_options[:default_options]
|
82
78
|
end
|
83
79
|
|
84
80
|
def options
|
85
81
|
return data[-1] if data.is_a?(Array) && data[-1].is_a?(Hash)
|
86
|
-
return data if data.is_a?(Hash)
|
87
82
|
return name if name.is_a?(Hash)
|
88
83
|
return default_options || {}
|
89
84
|
end
|
data/qor_dsl.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qor_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
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: 2012-11-
|
12
|
+
date: 2012-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Qor DSL is designed to be as flexible as possible while helping you to
|
15
15
|
create your DSLs.
|