#ruby-lang - Sun 1 Apr 2007 between 03:12 and 03:24

NY Lost Funds



PalishHow can I get the character code from a character?
tpope"a"[0]
it's ugly
if you have a literal
?a
?a #=> 97
apeiros"a".unpack("C*")[0] ^^
tpopeat least use .first
all that ironic work to get rid of the [0]
apeirosbah, more to type.
wmoxamwhat is the recommended way for a ruby script to access a restful interface?
An XML ORM mapper?
cdcarterwhoa! too many buzzwords
teferiwmoxam: REST doesn't have to be XML
cdcarter1/3 buzzwords, thats scary
wmoxamteferi: ok, so what do you recommend?
cdcarter: well, it is a legit question
cdcarteri know
tpopehe wants you to say, "a rails restful xml interface"
since that's probably what you really have
at which point he'll say
"ask in #rubyonrails n00b"
wmoxamWhat I'd like to do is something like this: item = Item.find('http://example.com', item_id) item.bar = 'baz' item.save
teferihonestly, i hadn;t thought of that
wmoxam: ActiveResource is, I think, what you want
and yes, #rubyonrails :D
tpopethe url is the equivalent of the db adapter in this case
putting that in find is ugly
but I digress
cdcarterwmoxam: it depends on the exposed intwrface
wmoxamtpope: true. It would be better to intiialize a base class with the url
but it made the example more clear
All of my googling on 'ruby REST' was finding articles about rest support in rails. which I don't care about
I'm trying to get an idea of what rest(ish) client libs are available
teferiwmoxam: activeresource is, iirc, a rest client library
it's a rails thing, though
tpopenow teferi has given you an answer twice
of course it is rails related
but what other ruby rest implementations are there?
wmoxamteferi: and it don't seem to be on the rails documentation site :P

Page: 2 9 16 23 30 37 44 51 58 

IrcArchive

NY Lost Funds