Module: RestCore::RailsUtilUtil::InstanceMethod
- Defined in:
- lib/rest-core/util/rails_util_util.rb
Class Method Summary collapse
- .rc_options_ctl(client) ⇒ Object
- .rc_options_extract(members, options, method) ⇒ Object
- .rc_options_get(client, key) ⇒ Object
- .rc_options_new(client) ⇒ Object
- .rc_setup(client, options = {}) ⇒ Object
Class Method Details
.rc_options_ctl(client) ⇒ Object
29 30 31 32 |
# File 'lib/rest-core/util/rails_util_util.rb', line 29 def client @rc_options_ctl ||= {} @rc_options_ctl[client.name] ||= {} end |
.rc_options_extract(members, options, method) ⇒ Object
39 40 41 |
# File 'lib/rest-core/util/rails_util_util.rb', line 39 def members, , method .send(method){ |(k, v)| members.member?(k) } end |
.rc_options_get(client, key) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/rest-core/util/rails_util_util.rb', line 21 def client, key if (client).has_key?(key) (client)[key] else client.send("default_#{key}") end end |
.rc_options_new(client) ⇒ Object
34 35 36 37 |
# File 'lib/rest-core/util/rails_util_util.rb', line 34 def client @rc_options_new ||= {} @rc_options_new[client.name] ||= {} end |
.rc_setup(client, options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rest-core/util/rails_util_util.rb', line 13 def rc_setup client, ={} (client).merge!( (client.members, , :reject)) (client).merge!( (client.members, , :select)) end |