开发者

accessing ruby object attribute

i am using oauth to create an oauth object which looks like 开发者_如何学编程this -

>> y @oauth
--- !ruby/object:LinkedIn::Oauth 
api_key: ggrgergrgrgrg
api_secret: 
consumer: &id001 !ruby/object:OAuth::Consumer 
key: ggergergrgrg
options: 
   blah blah

I can access

@oauth.consumer but not @oauth.api_key

Any ideas ?

Thanks, Alex


Is it a private method? Try accessing it with @oauth.send(:api_key)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜