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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee2c06493a4caf6e24704ac9d324b6ea576d2e7e
4
- data.tar.gz: 5f4debece4a5af37189f0598b7e6d5b3d49220ca
3
+ metadata.gz: 9af949b836d81ad21409034d5ed9c4afc7a4ba78
4
+ data.tar.gz: 3ceae004ad7dfe14efec14805ead1e8434cddd24
5
5
  SHA512:
6
- metadata.gz: 1a2e255d8965a7a424d6b10d2f3c6e2a26347560fab683c5e07deda51e51fb47ab9eccc4e44bb5f11181d07474cd499bd68f9a30335ad7d5e43c0c0e42fd5bfa
7
- data.tar.gz: e75fc34a55012c36cf7d1d8972aaedd5491c44541057a7fcc7baeb700ec979156868033723e198efd31eeb609d02a39d02992539711ca92f1ae011c554af9955
6
+ metadata.gz: e87246d16e6875e248e7bea55fa7f8dd8634781bff0d1e50a09b849e6302c351b4005c3ef912c257fbee71571d8eb3289b00ccd7ae21f2dfb0b87a5e95f6144e
7
+ data.tar.gz: eb093b614b5385916db8e2307945e076403ccf246453972a40cdc71f52b594b4fc291f8e9a5948967e7b5fe1b5ec7b02e8dcd7f747221a2956a898f82c28db07
@@ -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
- # HACK: I'd prefer to not lean on calling the underlying convert method
195
- # which means I will likely need some converter builder behavior.
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
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  # :nodoc:
2
3
  module PowerConverter
3
4
  # :nodoc:
4
- VERSION = "0.1.0".freeze
5
+ VERSION = "0.1.1".freeze
5
6
  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.0
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.4.7
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.