You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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...
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
The types returned from each method/attribute are really confusing - for example here:
where
ua.device.platform
actually returns aAgentOrange::Platform
object. Am I missing something? Documenting with YARD would be awesome, too...http://rubydoc.info/gems/agent_orange/frames
The text was updated successfully, but these errors were encountered: