facts must be an array

7 views
Skip to first unread message

Grant McInnes

unread,
Aug 20, 2007, 11:09:34 AM8/20/07
to rool...@googlegroups.com
Am I right in thinking that facts must be an array, rather than an
arbitrary type of object?

-grant

Pat Cappelaere

unread,
Aug 20, 2007, 1:23:03 PM8/20/07
to rool...@googlegroups.com
What makes you think that?
Pat.

gmcinnes

unread,
Sep 5, 2007, 11:05:49 AM9/5/07
to Rools-dev
I was looking at this method Pat (from facts.rb):

def value
if @fact_value.size == 1
@fact_value[0]
else
@fact_value
end
end

along with this comment:
#
# Facts are collections or recordsets created by the user
#

In my case I want to pass in a Range object, but since Range doesn't
have a size method it chokes here. I can get round this by adding a
size method to a custom range class, but that seems a bit grody, and
I"m not sure what the size check buys you. What's it for?

Reply all
Reply to author
Forward
0 new messages