Adds serialization support through the following methods (#63):
to_h: Serialize into a Ruby hash (with symbol keys). Accepts a boolean argument, representing whether or not to deep-serialize nested Author and Category objects (defaults to false).
as_json: Serialize into a Ruby hash which is also a valid JSON hash.
Adds ATTRIBUTES constant for Paper, Author and Category entities, as a list of which attributes are available for the entity. (#63)
Remove key-word arguments from Paper#id and Paper#url. (#70)
Previously, Paper#id and Paper#url accepted a version key-word argument, which was a boolean variable indicating whether or not to include the version number in the ID or URL.
This has now been changed to a regular argument, which still defaults to false.
paper = Arx.get('cond-mat/9609089')
# Old (no longer works)
paper.id(version: true)
paper.url(version: true)
# New
paper.id(true) #=> "cond-mat/9609089v1"
paper.url(true) #=> "http://arxiv.org/abs/cond-mat/9609089v1"
Major changes
to_h
: Serialize into a Ruby hash (with symbol keys). Accepts a boolean argument, representing whether or not to deep-serialize nestedAuthor
andCategory
objects (defaults tofalse
).as_json
: Serialize into a Ruby hash which is also a valid JSON hash.to_json
: Serialize into a valid JSON string.ATTRIBUTES
constant forPaper
,Author
andCategory
entities, as a list of which attributes are available for the entity. (#63)Paper#id
andPaper#url
. (#70)==
) to entities. (#68)Minor changes
CATEGORIES
. (#71)README.md
under the Acknowledgements section. (#66)yard
development dependency for documentation. (#65)coveralls
[= 0.8.22
to= 0.8.23
] (#62)thor
[~> 0.19.4
to~> 0.20.3
] (#67)