simple_descriptor 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -142,14 +142,9 @@ module SimpleDescriptor #:nodoc:
|
|
142
142
|
def shortcut_description(*args)
|
143
143
|
raise ArgumentError unless args.last.is_a?(Hash) && args.last.key?(:as)
|
144
144
|
options = args.pop
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
define_method :cippa do
|
149
|
-
"cippa"
|
150
|
-
end
|
151
|
-
method_name = class_variable_get("@@shortcut")
|
152
|
-
description = class_variable_get("@@shortcut_description")
|
145
|
+
(class << self; self; end).module_eval do
|
146
|
+
method_name = options[:as]
|
147
|
+
description= args.first
|
153
148
|
raise "#{method_name} already defined" if methods.member?(method_name)
|
154
149
|
define_method(method_name) do |*args|
|
155
150
|
if args.size == 0
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.0
|
3
3
|
specification_version: 1
|
4
4
|
name: simple_descriptor
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date:
|
6
|
+
version: 0.1.1
|
7
|
+
date: 2007-01-07 00:00:00 +00:00
|
8
8
|
summary: description of gem
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,6 +25,7 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
+
post_install_message:
|
28
29
|
authors:
|
29
30
|
- blank
|
30
31
|
files:
|
@@ -33,8 +34,8 @@ files:
|
|
33
34
|
- Rakefile
|
34
35
|
- test/test_helper.rb
|
35
36
|
- test/simple_descriptor_test.rb
|
36
|
-
- lib/simple_descriptor
|
37
37
|
- lib/simple_descriptor.rb
|
38
|
+
- lib/simple_descriptor
|
38
39
|
- lib/simple_descriptor/class_descriptor.rb
|
39
40
|
- lib/simple_descriptor/version.rb
|
40
41
|
test_files: []
|