simple_descriptor 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- @@shortcut = options[:as]
146
- @@shortcut_description = args.first
147
- class << self
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
@@ -2,7 +2,7 @@ module SimpleDescriptor #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
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.0
7
- date: 2006-11-24 00:00:00 +00:00
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: []