y_support 2.0.25 → 2.0.26

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: 0561e18c5b606a92e92f8ebfe01b3e350ad8feab
4
- data.tar.gz: 05822896871dba52532fb86bb1260c294c834076
3
+ metadata.gz: 5e6a058c7448c3b6509f06094c0a87e0c461f76a
4
+ data.tar.gz: a762394265c6944cee3c03c425db229be6413461
5
5
  SHA512:
6
- metadata.gz: 6accb0f8a63e501963efbe7abeb5eca5c5674e9138e84e8e28c98ec12959680595d40763da3a3ec69a62a8e74422969a42ff2f03811d3ea871192cee87bb225b
7
- data.tar.gz: 5aaefcb56b0efa60fd847d28649c8b893d6af7919fdf7dc98e51957d534f5b7c560c7d1f7bef61de5d2b9bb00239bb65856a61335795b88573f82e5e53633e45
6
+ metadata.gz: 3b573bdc654d513ea128b8365b55673635de52bea8c70d0a98430f907efb661693dfb1a92fc05025b76cdc98d9c476d011f514f97be58a28d586837632305a9d
7
+ data.tar.gz: 19f94cca7c6ca5920209c1565c09ccaba9d5d910699144016780e1fdd61131b531ecef00608d5e9c985779675c0c3f937b52b5c084ff762dde22d0c1a50dda52
@@ -6,7 +6,7 @@ class Class
6
6
  # singleton method(s) named "symbol" be defined on the subclass, returning
7
7
  # "value".
8
8
  #
9
- def parametrize **parameters
9
+ def parametrize parameters
10
10
  Class.new( self ).tap do |subclass|
11
11
  parameters.each_pair { |symbol, value|
12
12
  subclass.define_singleton_method symbol do value end
@@ -5,11 +5,11 @@ class Object
5
5
  # getter (reader) methods. Optional argument +:overwrite_methods+ enables the
6
6
  # readers to overwrite existing methods.
7
7
  #
8
- def set_attr_with_readers( overwrite_methods: false, **hash )
8
+ def set_attr_with_readers( hash )
9
9
  hash.each_pair { |symbol, value|
10
10
  instance_variable_set "@#{symbol}", value
11
11
  fail NameError, "Method \##{symbol} already defined!" if
12
- methods.include? symbol unless overwrite_methods == true
12
+ methods.include? symbol unless hash[:overwrite_methods] == true
13
13
  singleton_class.class_exec { attr_reader symbol }
14
14
  }
15
15
  end
@@ -20,7 +20,10 @@ class Object
20
20
  # are made accessible under the supplied reader symbol.
21
21
  #
22
22
  def param_class hash, with: (fail ArgumentError, "No parameters!")
23
- hash.each { |ß, ç| set_attr_with_readers ß => ç.parametrize( **with ) }
23
+ hash.each { |ß, ç|
24
+ sub = ç.parametrize with
25
+ set_attr_with_readers( ß => sub )
26
+ }
24
27
  return nil
25
28
  end
26
29
  end
@@ -1,3 +1,3 @@
1
1
  module YSupport
2
- VERSION = "2.0.25"
2
+ VERSION = "2.0.26"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: y_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.25
4
+ version: 2.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - boris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-25 00:00:00.000000000 Z
11
+ date: 2013-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport