fanforce 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fanforce/main.rb CHANGED
@@ -6,9 +6,13 @@ class Fanforce
6
6
  include Fanforce::Utils
7
7
  attr_reader :params
8
8
  ########################################################################
9
- def initialize(params={})
10
- add_params(params)
11
- auth(@params) if @params.length > 0
9
+ def initialize(arg={})
10
+ if arg.is_a?(Hash)
11
+ add_params(arg)
12
+ auth(@params) if @params.length > 0
13
+ elsif arg.is_a?(String)
14
+ auth(arg)
15
+ end
12
16
  end
13
17
 
14
18
  def add_params(params)
@@ -1,3 +1,3 @@
1
1
  class Fanforce
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: