Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README out of date #29

Open
afeld opened this issue Nov 20, 2012 · 2 comments
Open

README out of date #29

afeld opened this issue Nov 20, 2012 · 2 comments

Comments

@afeld
Copy link
Contributor

afeld commented Nov 20, 2012

The types returned from each method/attribute are really confusing - for example here:

> platform = ua.device.platform
=> "iPhone"

where ua.device.platform actually returns a AgentOrange::Platform object. Am I missing something? Documenting with YARD would be awesome, too...

http://rubydoc.info/gems/agent_orange/frames

@kevinelliott
Copy link
Owner

The reason that could return "iPhone" is because to_s is defined on AgentOrange::Platform, and so it will have a string representation of the object, rather than the object itself. Where possible, I have tried to define to_s on each class.

Good idea about YARD, I'll look into it.

On Nov 19, 2012, at 8:43 PM, Aidan Feldman [email protected] wrote:

The types returned from each method/attribute are really confusing - for example here:

platform = ua.device.platform
=> "iPhone"
where ua.device.platform actually returns a AgentOrange::Platform object. Am I missing something? Documenting with YARD would be awesome, too...

http://rubydoc.info/gems/agent_orange/frames


Reply to this email directly or view it on GitHub.

@afeld
Copy link
Contributor Author

afeld commented Nov 20, 2012

Right - I just think this would be less confusing:

> platform = ua.device.platform
=> #<AgentOrange::Platform:...>
> platform.to_s
=> "iPhone"
> platform.type
=> :apple # not "iphone" - this is incorrect in the README, FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants