reality-core 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ec01d2c7db8b2a8a50d462accc1cd9d0087c0a4
4
- data.tar.gz: da5c9751c965418db64296601a89017333d8a593
3
+ metadata.gz: d24305253302c7aa643f825e17153efba609f57d
4
+ data.tar.gz: 3a8f9a866751c58b4fae0d1cc1cace8dd97205a2
5
5
  SHA512:
6
- metadata.gz: e040f80ee44f23428bc990edede6d817c966e706d6c1858e45b0219e38a8f69fda3e94c60977d99d10713c24b193041e5aa7115f5e20c56be210d19b06c95660
7
- data.tar.gz: c2deb93199c2343cf0bbd2ce7ce7caee40c75381cd166c8ccc16e83b2ccb53bae50c767847f5fb10adba860b201aab7880518249b13da4244d953a966fafaf76
6
+ metadata.gz: 9f9cfe5ec01a41b474e6520ce4aa2ec7b360976570f05f8fb362c64675e9c8cf100ed472a2320f626033da1dd02e0390cb08582a0e01295da3bc8378d49dbc95
7
+ data.tar.gz: d6f572d5cbfa2e6cdd920b49f691a23b19f16e5874a6023310f221ab68fbef1b2e83a2a3067d79b39f848fa8d1e35f72d8b7e82c1ee27c33103938807c86f702
@@ -40,7 +40,7 @@ module Reality #nodoc
40
40
  def self.base_element(options = {})
41
41
  type = Class.new(BaseElement)
42
42
 
43
- parent_key = options[:parent_key]
43
+ container_key = options[:container_key]
44
44
  pre_config_code = options[:pre_config_code]
45
45
  has_name = !!options[:name]
46
46
  has_key = !!options[:key]
@@ -50,12 +50,12 @@ module Reality #nodoc
50
50
  parameters = []
51
51
  initializers = ''
52
52
 
53
- if parent_key
54
- code += "attr_reader :#{parent_key}\n"
55
- parameters << parent_key
53
+ if container_key
54
+ code += "attr_reader :#{container_key}\n"
55
+ parameters << container_key
56
56
  initializers += <<-RUBY
57
- @#{parent_key} = #{parent_key}
58
- raise "Nil #{parent_key} parameter passed to #{self.class} instance" if @#{parent_key}.nil?
57
+ @#{container_key} = #{container_key}
58
+ raise "Nil #{container_key} parameter passed to #{self.class} instance" if @#{container_key}.nil?
59
59
  RUBY
60
60
  end
61
61
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reality-core}
5
- s.version = '1.3.0'
5
+ s.version = '1.4.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ['Peter Donald']
@@ -37,7 +37,7 @@ class Reality::TestBaseElement < Reality::TestCase
37
37
  class TestElementA < Reality.base_element
38
38
  end
39
39
 
40
- class TestElementB < Reality.base_element(:parent_key => 'container')
40
+ class TestElementB < Reality.base_element(:container_key => 'container')
41
41
  end
42
42
 
43
43
  class TestElementC < Reality.base_element(:name => true)
@@ -49,7 +49,7 @@ class Reality::TestBaseElement < Reality::TestCase
49
49
  class TestElementE < Reality.base_element(:name => true, :key => true)
50
50
  end
51
51
 
52
- class TestElementF < Reality.base_element(:parent_key => 'container', :name => true, :key => true)
52
+ class TestElementF < Reality.base_element(:container_key => 'container', :name => true, :key => true)
53
53
  end
54
54
 
55
55
  class TestElementG < Reality.base_element(:pre_config_code => 'self.foo = 1')
@@ -96,8 +96,8 @@ class Reality::TestBaseElement < Reality::TestCase
96
96
  end
97
97
 
98
98
  begin
99
- TestElementG.new do |e|
100
- assert_equal e.foo, 1
99
+ TestElementG.new do |te|
100
+ assert_equal te.foo, 1
101
101
  end
102
102
  end
103
103
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reality-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Donald