recordx 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/recordx.rb +14 -1
  2. metadata +3 -5
data/lib/recordx.rb CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  class RecordX
6
6
 
7
+ attr_reader :id
8
+
7
9
  class RXHash < Hash
8
10
  def initialize(callerx)
9
11
  super()
@@ -31,6 +33,17 @@ class RecordX
31
33
  end
32
34
 
33
35
  def attr_accessor2(name,val=nil)
36
+
37
+ reserved_keywords = (
38
+ Object.public_methods | \
39
+ Kernel.public_methods | \
40
+ public_methods + [:method_missing]
41
+ )
42
+
43
+ name.prepend '_' if reserved_keywords.include? name.to_sym
44
+ puts 'inside recordx with name ' + name.inspect
45
+ puts 'val : ' + val.inspect
46
+
34
47
  self.instance_eval %Q{
35
48
  def #{name}=(s)
36
49
  @#{name} = s.to_s
@@ -52,4 +65,4 @@ class RecordX
52
65
  end
53
66
 
54
67
  alias to_h h
55
- end
68
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: recordx
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-15 00:00:00 +01:00
14
- default_executable:
13
+ date: 2012-06-26 00:00:00 Z
15
14
  dependencies: []
16
15
 
17
16
  description:
@@ -24,7 +23,6 @@ extra_rdoc_files: []
24
23
 
25
24
  files:
26
25
  - lib/recordx.rb
27
- has_rdoc: true
28
26
  homepage:
29
27
  licenses: []
30
28
 
@@ -48,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
46
  requirements: []
49
47
 
50
48
  rubyforge_project:
51
- rubygems_version: 1.5.2
49
+ rubygems_version: 1.8.23
52
50
  signing_key:
53
51
  specification_version: 3
54
52
  summary: recordx