Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/simple_mapper/default_plugins/options_to_query.rb,
lib/simple_mapper/support/core_ext.rb
Overview
First the structural base:
Instance Method Summary collapse
-
#extended(*args, &block) ⇒ Object
Calls the block in the context of self, and returns self.
-
#to_param ⇒ Object
:nodoc:.
-
#to_query(key) ⇒ Object
:nodoc:.
Instance Method Details
#extended(*args, &block) ⇒ Object
Calls the block in the context of self, and returns self.
5 6 7 8 |
# File 'lib/simple_mapper/support/core_ext.rb', line 5 def extended(*args, &block) self.send(:eval, block.to_ruby).call(*args) self end |
#to_param ⇒ Object
:nodoc:
6 7 8 |
# File 'lib/simple_mapper/default_plugins/options_to_query.rb', line 6 def to_param #:nodoc: to_s end |
#to_query(key) ⇒ Object
:nodoc:
9 10 11 |
# File 'lib/simple_mapper/default_plugins/options_to_query.rb', line 9 def to_query(key) #:nodoc: "#{CGI.escape(key.to_s)}=#{CGI.escape(to_param || "")}" end |