bsm-sso-client 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@ class Bsm::Sso::Client::AbstractResource < Hash
56
56
 
57
57
  # @return [Boolean] true, if method exists?
58
58
  def respond_to?(method, *)
59
- super || key?(method.to_s)
59
+ super || key?(method.to_s.sub(/[=?]$/, ''))
60
60
  end
61
61
 
62
62
  # @return [Hash] attributes hash
@@ -66,8 +66,17 @@ class Bsm::Sso::Client::AbstractResource < Hash
66
66
 
67
67
  protected
68
68
 
69
- def method_missing(method, *)
70
- key?(method.to_s) ? fetch(method.to_s) : super
69
+ def method_missing(method, *arguments)
70
+ method, punctation = method.to_s.sub(/([=?])$/, ''), $1
71
+
72
+ case punctation
73
+ when "="
74
+ store(method, arguments.first)
75
+ when "?"
76
+ self[method]
77
+ else
78
+ key?(method) ? fetch(method) : super
79
+ end
71
80
  end
72
81
 
73
82
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bsm-sso-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
12
+ date: 2012-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties