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
40 41 42 43 |
# File 'lib/rest-core/util/rails_util_util.rb', line 40 def client @rc_options_ctl ||= {} @rc_options_ctl[client.name] ||= {} end |
.rc_options_extract(members, options, method) ⇒ Object
50 51 52 |
# File 'lib/rest-core/util/rails_util_util.rb', line 50 def members, , method .send(method){ |(k, v)| members.member?(k) } end |
.rc_options_get(client, key) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/rest-core/util/rails_util_util.rb', line 32 def client, key if (client).has_key?(key) (client)[key] else client.send("default_#{key}") end end |
.rc_options_new(client) ⇒ Object
45 46 47 48 |
# File 'lib/rest-core/util/rails_util_util.rb', line 45 def client @rc_options_new ||= {} @rc_options_new[client.name] ||= {} end |
.rc_setup(client, options = {}) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/rest-core/util/rails_util_util.rb', line 24 def rc_setup client, ={} (client).merge!( (client.members, , :reject)) (client).merge!( (client.members, , :select)) end |