Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/codebutler/sinatra.rb,
lib/codebutler/sinatra.rb
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
993 994 995 |
# File 'lib/codebutler/sinatra.rb', line 993 def to_hash self.inject({}) { |h, (k, v)| h[k] = v; h } end |
#to_proc ⇒ Object
997 998 999 |
# File 'lib/codebutler/sinatra.rb', line 997 def to_proc Proc.new { |*args| args.shift.__send__(self[0], *(args + self[1..-1])) } end |
#to_result(cx, *args) ⇒ Object
1028 1029 1030 |
# File 'lib/codebutler/sinatra.rb', line 1028 def to_result(cx, *args) self.shift.to_result(cx, *self) end |