projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a1f5ce
)
add first,last,[] methods
author
Tom Clegg <tom@clinicalfuture.com>
Mon, 18 Feb 2013 21:05:54 +0000
(13:05 -0800)
committer
Tom Clegg <tom@clinicalfuture.com>
Mon, 18 Feb 2013 21:05:54 +0000
(13:05 -0800)
app/models/orvos_resource_list.rb
patch
|
blob
|
history
diff --git
a/app/models/orvos_resource_list.rb
b/app/models/orvos_resource_list.rb
index 8ce8d6aa5690367f7e5c1fca48c5d1a7401f3e95..aa6961e369c905157a49f4593349750889d95b97 100644
(file)
--- a/
app/models/orvos_resource_list.rb
+++ b/
app/models/orvos_resource_list.rb
@@
-67,6
+67,18
@@
class OrvosResourceList
self
end
+ def first
+ results.first
+ end
+
+ def last
+ results.last
+ end
+
+ def [](*x)
+ results.send('[]', *x)
+ end
+
def |(x)
if x.is_a? Hash
self.to_hash | x