Alex
Alex

Reputation: 6485

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

Upvotes: 0

Views: 480

Answers (1)

Peter Brown
Peter Brown

Reputation: 51717

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

Upvotes: 1

Related Questions