accessor_utilities 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  module ::AccessorUtilities::AccessorMath
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  module ::AccessorUtilities::ObjectInstance
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  module ::AccessorUtilities::StringInstance
3
4
 
@@ -25,6 +26,12 @@ module ::AccessorUtilities::StringInstance
25
26
  return ( is_variable_name? ? self.slice( 1, length ).to_sym : to_sym )
26
27
  end
27
28
 
29
+ ##############
30
+ # accessor #
31
+ ##############
32
+
33
+ alias_method :accessor, :accessor_name
34
+
28
35
  #########################
29
36
  # write_accessor_name #
30
37
  #########################
@@ -47,6 +54,12 @@ module ::AccessorUtilities::StringInstance
47
54
 
48
55
  end
49
56
 
57
+ ####################
58
+ # write_accessor #
59
+ ####################
60
+
61
+ alias_method :write_accessor, :write_accessor_name
62
+
50
63
  ##################
51
64
  # swizzle_name #
52
65
  ##################
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  module ::AccessorUtilities::Swizzle
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  module ::AccessorUtilities::SymbolInstance
3
4
 
@@ -1,18 +1,7 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  # namespaces that have to be declared ahead of time for proper load order
3
4
  require_relative './namespaces'
4
5
 
5
6
  # source file requires
6
7
  require_relative './requires.rb'
7
-
8
- class ::Object
9
- include ::AccessorUtilities::ObjectInstance
10
- end
11
-
12
- class ::String
13
- include ::AccessorUtilities::StringInstance
14
- end
15
-
16
- class ::Symbol
17
- include ::AccessorUtilities::SymbolInstance
18
- end
data/lib/namespaces.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  module ::AccessorUtilities
3
4
  end
data/lib/requires.rb CHANGED
@@ -1,6 +1,11 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative 'accessor_utilities/object_instance.rb'
3
4
  require_relative 'accessor_utilities/accessor_math.rb'
4
5
  require_relative 'accessor_utilities/swizzle.rb'
5
6
  require_relative 'accessor_utilities/string_instance.rb'
6
7
  require_relative 'accessor_utilities/symbol_instance.rb'
8
+
9
+ require_relative '../lib_ext/object.rb'
10
+ require_relative '../lib_ext/string.rb'
11
+ require_relative '../lib_ext/symbol.rb'
data/lib_ext/object.rb ADDED
@@ -0,0 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
2
+
3
+ class ::Object
4
+
5
+ include ::AccessorUtilities::ObjectInstance
6
+
7
+ end
8
+
data/lib_ext/string.rb ADDED
@@ -0,0 +1,7 @@
1
+ # -*- encoding : utf-8 -*-
2
+
3
+ class ::String
4
+
5
+ include ::AccessorUtilities::StringInstance
6
+
7
+ end
data/lib_ext/symbol.rb ADDED
@@ -0,0 +1,7 @@
1
+ # -*- encoding : utf-8 -*-
2
+
3
+ class ::Symbol
4
+
5
+ include ::AccessorUtilities::SymbolInstance
6
+
7
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative '../../lib/accessor_utilities.rb'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative '../../lib/accessor_utilities.rb'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative '../../lib/accessor_utilities.rb'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative '../../lib/accessor_utilities.rb'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative '../../lib/accessor_utilities.rb'
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
 
2
3
  require_relative '../lib/accessor_utilities.rb'
3
4
 
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.1
4
+ version: 1.0.2
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-07-11 00:00:00.000000000 Z
12
+ date: 2013-03-18 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,
@@ -27,6 +27,9 @@ files:
27
27
  - lib/accessor_utilities.rb
28
28
  - lib/namespaces.rb
29
29
  - lib/requires.rb
30
+ - lib_ext/object.rb
31
+ - lib_ext/string.rb
32
+ - lib_ext/symbol.rb
30
33
  - spec/accessor_utilities/accessor_math_spec.rb
31
34
  - spec/accessor_utilities/object_instance_spec.rb
32
35
  - spec/accessor_utilities/string_instance_spec.rb
@@ -54,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
57
  version: '0'
55
58
  requirements: []
56
59
  rubyforge_project: accessor_utilities
57
- rubygems_version: 1.8.23
60
+ rubygems_version: 1.8.24
58
61
  signing_key:
59
62
  specification_version: 3
60
63
  summary: Utility methods for accessor-related meta-programming.