maiha-dsl_accessor 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/core_ext/class/dsl_accessor.rb +1 -1
- data/core_ext/class/inheritable_attributes.rb +3 -3
- metadata +2 -2
data/Rakefile
CHANGED
@@ -33,7 +33,7 @@ AUTHOR = "maiha"
|
|
33
33
|
EMAIL = "maiha@wota.jp"
|
34
34
|
HOMEPAGE = "http://github.com/maiha/dsl_accessor"
|
35
35
|
SUMMARY = "This plugin gives hybrid accessor class methods to classes by DSL like definition"
|
36
|
-
GEM_VERSION = "0.3.
|
36
|
+
GEM_VERSION = "0.3.2"
|
37
37
|
|
38
38
|
spec = Gem::Specification.new do |s|
|
39
39
|
# s.rubyforge_project = 'merb'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
unless Class.new.respond_to?(:
|
1
|
+
unless Class.new.respond_to?(:write_inheritable_attribute)
|
2
2
|
require File.dirname(__FILE__) + "/../duplicable" unless Object.new.respond_to?(:duplicable?)
|
3
3
|
require File.dirname(__FILE__) + "/inheritable_attributes"
|
4
4
|
end
|
@@ -23,7 +23,7 @@ class Class # :nodoc:
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def class_inheritable_writer(*syms)
|
26
|
-
options = syms.
|
26
|
+
options = syms.last.is_a?(::Hash) ? syms.pop : {}
|
27
27
|
syms.each do |sym|
|
28
28
|
class_eval <<-EOS
|
29
29
|
def self.#{sym}=(obj)
|
@@ -40,7 +40,7 @@ class Class # :nodoc:
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def class_inheritable_array_writer(*syms)
|
43
|
-
options = syms.
|
43
|
+
options = syms.last.is_a?(::Hash) ? syms.pop : {}
|
44
44
|
syms.each do |sym|
|
45
45
|
class_eval <<-EOS
|
46
46
|
def self.#{sym}=(obj)
|
@@ -57,7 +57,7 @@ class Class # :nodoc:
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def class_inheritable_hash_writer(*syms)
|
60
|
-
options = syms.
|
60
|
+
options = syms.last.is_a?(::Hash) ? syms.pop : {}
|
61
61
|
syms.each do |sym|
|
62
62
|
class_eval <<-EOS
|
63
63
|
def self.#{sym}=(obj)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maiha-dsl_accessor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maiha
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-13 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|