acclaim 0.4.0 → 0.4.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.
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -153,15 +153,16 @@ module Acclaim
153
153
 
154
154
  # Generate human-readable string containing this option's data.
155
155
  #
156
- # @return [String] string describing this option
156
+ # @return [String] human-readable representation of this option
157
+ # @since 0.4.0
157
158
  def inspect
158
- '#<%s %s (%s) %s = %s %s %s %s>' % [
159
- self.class.name,
159
+ '#<%s %s (%s) %s = %p (%s) (1+ => %s) %s>' % [
160
+ self.class,
160
161
  key,
161
162
  names.join('|'),
162
- type.inspect,
163
- default.inspect,
164
- arity.inspect,
163
+ type,
164
+ default,
165
+ arity,
165
166
  on_multiple,
166
167
  if required? then :required else :optional end
167
168
  ]
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Acclaim
2
4
  class Option
3
5
 
@@ -84,18 +86,24 @@ module Acclaim
84
86
 
85
87
  # Returns a string in the following format:
86
88
  #
87
- # Arity: minimum +optional
89
+ # minimum +optional
90
+ #
91
+ # The value of optional will be ∞ if this arity is not {#bound? bound}.
88
92
  #
89
- # The value of +optional+ will be <tt>'infinite'</tt> if #unlimited? is
90
- # +true+.
93
+ # @return [String] string representation of this arity
94
+ # @see #inspect
91
95
  def to_s
92
- "Arity: #{minimum} +#{unlimited? ? 'infinite' : optional}"
96
+ "#{minimum} +#{unlimited? ? '' : optional}"
93
97
  end
94
98
 
95
- # Returns the output of #to_s, enclosed in angle brackets (<tt>'<'</tt>
96
- # and <tt>'>'</tt>).
99
+ # Returns a string in the following format:
100
+ #
101
+ # #<Acclaim::Option::Arity minimum +optional>
102
+ #
103
+ # @return [String] human-readable representation of this arity object
104
+ # @see #to_s
97
105
  def inspect
98
- "<#{to_s}>"
106
+ "#<#{self.class} #{to_s}>"
99
107
  end
100
108
 
101
109
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acclaim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  segments:
170
170
  - 0
171
- hash: 3293933185562874440
171
+ hash: 603733755456817877
172
172
  required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  none: false
174
174
  requirements:
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  segments:
179
179
  - 0
180
- hash: 3293933185562874440
180
+ hash: 603733755456817877
181
181
  requirements: []
182
182
  rubyforge_project:
183
183
  rubygems_version: 1.8.24