power_converter 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 231f3bafb26ecf2efc70db2d2338e588507e3b5e
4
- data.tar.gz: 23559b89538e7c97be6c0e236195ed0ff10dec2b
3
+ metadata.gz: d0c79c8bb2c5a433c5e9be7f0d89b38d4f45dddb
4
+ data.tar.gz: 98a0b0f03b6f2418321c8cc8f8729792c65c9c5e
5
5
  SHA512:
6
- metadata.gz: f1d69e2b8ec68a7a1243a859275f27fee157d9f2ebf6c917aba19917cb9fb3a918084787a7f118bbaa6ff9388ee44765a1351585cf35a3fff1bea9c174f249e2
7
- data.tar.gz: 405afa509040219845f92b70f3830d75714651c2fd2c4e559684967df4ddc188c97fd5252394f6217dc5b19d437a2b4fdebe746bb52a7eae019877457e38a8e4
6
+ metadata.gz: 5be777d8d8d8f932306e80756e0e3b3d6dcbe1345c7b67028e23d4613be8ee00970af60cc0e751282520a7c58ba70802df6ae8825cfef5a0f12596fbaf1de65d
7
+ data.tar.gz: 0d611dbdab872ebefb5fa49ec3501132464a8c67a61e392fb119cbad6214270edcf48e76d2428fd8eccbacf2141c2fa990a5ef8f63a4645abe60b490c0a99eb8
@@ -35,7 +35,9 @@ module PowerConverter
35
35
  # great exception to raise.
36
36
  class ConversionError < RuntimeError
37
37
  # @param value [Object]
38
- # @param named_converter [#to_s]
38
+ # @param options [Hash]
39
+ # @option options [Symbol] :to what did we just attempt to convert?
40
+ # @option options [Symbol] :scope is there a scope related to this conversion attempt?
39
41
  #
40
42
  # Do or do not. There is no try.
41
43
  #
@@ -44,7 +46,7 @@ module PowerConverter
44
46
  def initialize(value, options)
45
47
  named_converter = options[:to]
46
48
  scope = options[:scope]
47
- super("Unable to convert #{value.inspect} to '#{named_converter}' (scope: #{scope.inspect}.")
49
+ super("Unable to convert #{value.inspect} to '#{named_converter}' (scope: #{scope.inspect}).")
48
50
  end
49
51
  end
50
52
 
@@ -56,8 +58,8 @@ module PowerConverter
56
58
  # Responsible for defining a conversion method and a "shovel-ready" conversion
57
59
  # module; because maybe you want a mixin for convenience reasons.
58
60
  #
59
- # @note If your defined converter returns `nil`, it is assumed if the
60
- # conversion failed and a [PowerConverter::ConversionError] exception should
61
+ # @note If your defined converter returns `nil`, it is assumed that the
62
+ # conversion failed and a [PowerConverter::ConversionError] exception will
61
63
  # be thrown.
62
64
  #
63
65
  # @param named_conversion [String,Symbol] the name of the conversion that you
@@ -181,6 +183,9 @@ module PowerConverter
181
183
  # end
182
184
  #
183
185
  # @todo Allow for the inclusion of multiple power converter named types.
186
+ #
187
+ # @note This does not allow for the robustness of the .convert method. I'm
188
+ # wondering about its ongoing value.
184
189
  def module_for(named_conversion)
185
190
  Module.new do
186
191
  # HACK: I'd prefer to not lean on calling the underlying convert method
@@ -1,5 +1,5 @@
1
1
  # :nodoc:
2
2
  module PowerConverter
3
3
  # :nodoc:
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: power_converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-17 00:00:00.000000000 Z
11
+ date: 2015-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.4.6
129
+ rubygems_version: 2.4.7
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: A lightweight library to define object conversion methods/modules.