Class: Paperlex::Versions
- Inherits:
-
Base
- Object
- Hashie::Dash
- Base
- Paperlex::Versions
show all
- Defined in:
- lib/paperlex/versions.rb
Instance Method Summary
collapse
Methods inherited from Base
[], delete, get, parse, post, put, #to_uuid
Constructor Details
#initialize(uuid) ⇒ Versions
Returns a new instance of Versions.
3
4
5
|
# File 'lib/paperlex/versions.rb', line 3
def initialize(uuid)
super(:uuid => uuid)
end
|
Instance Method Details
#all ⇒ Object
7
8
9
|
# File 'lib/paperlex/versions.rb', line 7
def all
self.class.get(collection_url)
end
|
#find(version_index) ⇒ Object
11
12
13
|
# File 'lib/paperlex/versions.rb', line 11
def find(version_index)
self.class.get(url_for(version_index))
end
|
#revert_to(version_index) ⇒ Object
15
16
17
|
# File 'lib/paperlex/versions.rb', line 15
def revert_to(version_index)
self.class.post("#{base}/#{uuid}/versions/#{version_index}/revert.json")
end
|