power_converter 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/power_converter.rb +3 -5
- data/lib/power_converter/version.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9af949b836d81ad21409034d5ed9c4afc7a4ba78
|
4
|
+
data.tar.gz: 3ceae004ad7dfe14efec14805ead1e8434cddd24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e87246d16e6875e248e7bea55fa7f8dd8634781bff0d1e50a09b849e6302c351b4005c3ef912c257fbee71571d8eb3289b00ccd7ae21f2dfb0b87a5e95f6144e
|
7
|
+
data.tar.gz: eb093b614b5385916db8e2307945e076403ccf246453972a40cdc71f52b594b4fc291f8e9a5948967e7b5fe1b5ec7b02e8dcd7f747221a2956a898f82c28db07
|
data/lib/power_converter.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require "power_converter/version"
|
2
3
|
|
3
4
|
# PowerConverter is a composition service module. It provides a way to define
|
@@ -191,11 +192,8 @@ module PowerConverter
|
|
191
192
|
# wondering about its ongoing value.
|
192
193
|
def module_for(named_conversion)
|
193
194
|
Module.new do
|
194
|
-
|
195
|
-
|
196
|
-
define_method("#{CONVERSION_METHOD_PREFIX}#{named_conversion}") do |value|
|
197
|
-
PowerConverter.convert(value, to: named_conversion)
|
198
|
-
end
|
195
|
+
extend Forwardable
|
196
|
+
def_delegator PowerConverter, "#{CONVERSION_METHOD_PREFIX}#{named_conversion}"
|
199
197
|
private "#{CONVERSION_METHOD_PREFIX}#{named_conversion}"
|
200
198
|
end
|
201
199
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: power_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
@@ -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.
|
129
|
+
rubygems_version: 2.5.1
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: A lightweight library to define object conversion methods/modules.
|