settable_constructor_variables 2 → 3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module SettableConstructorVariables
2
2
  def initialize params = {}
3
- raise ArgumentError, "Constructor parameter must be hash." unless params.class == Hash
3
+ raise ArgumentError, "Constructor parameter must be hash." unless params.is_a? Hash
4
4
  params.each do |key, value|
5
5
  instance_variable_set "@#{key}", value
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module SettableConstructorVariables
2
- VERSION = 2
2
+ VERSION = 3
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settable_constructor_variables
3
3
  version: !ruby/object:Gem::Version
4
- version: '2'
4
+ version: '3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- requirement: &70343993895220 !ruby/object:Gem::Requirement
16
+ requirement: &70210070230340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70343993895220
24
+ version_requirements: *70210070230340
25
25
  description: Hyper lazy way of setting instance variables automatically by passing
26
26
  them to your constructor. Least clever gem ever?
27
27
  email: