accessor_utilities 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/accessor_utilities/string_instance.rb +15 -2
- metadata +3 -4
@@ -23,7 +23,18 @@ module ::AccessorUtilities::StringInstance
|
|
23
23
|
###################
|
24
24
|
|
25
25
|
def accessor_name
|
26
|
-
|
26
|
+
|
27
|
+
return_value = nil
|
28
|
+
|
29
|
+
case self[ -1 ]
|
30
|
+
when '='
|
31
|
+
return_value = slice( 0, length - 1 )
|
32
|
+
else
|
33
|
+
return_value = is_variable_name? ? self.slice( 1, length ).to_sym : to_sym
|
34
|
+
end
|
35
|
+
|
36
|
+
return return_value
|
37
|
+
|
27
38
|
end
|
28
39
|
|
29
40
|
##############
|
@@ -37,7 +48,9 @@ module ::AccessorUtilities::StringInstance
|
|
37
48
|
#########################
|
38
49
|
|
39
50
|
def write_accessor_name
|
40
|
-
|
51
|
+
|
52
|
+
return_value = nil
|
53
|
+
|
41
54
|
case self[ -1 ]
|
42
55
|
|
43
56
|
when '?'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accessor_utilities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
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: 2013-
|
12
|
+
date: 2013-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Extends String and Symbol instances with variable/accessor methods, provides
|
15
15
|
swizzling helpers, provides accessor-related math for transforming :accessor, :reader,
|
@@ -56,9 +56,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
version: '0'
|
57
57
|
requirements: []
|
58
58
|
rubyforge_project: accessor_utilities
|
59
|
-
rubygems_version: 1.8.
|
59
|
+
rubygems_version: 1.8.23
|
60
60
|
signing_key:
|
61
61
|
specification_version: 3
|
62
62
|
summary: Utility methods for accessor-related meta-programming.
|
63
63
|
test_files: []
|
64
|
-
has_rdoc:
|