Class: BaseJSON
- Inherits:
-
Object
show all
- Defined in:
- lib/veye/views/base_json.rb
Direct Known Subclasses
Veye::Github::InfoJSON, Veye::Github::ListJSON, Veye::Github::SearchJSON, Veye::Package::InfoJSON, Veye::Package::ReferencesJSON, Veye::Package::SearchJSON, Veye::Package::VersionsJSON, Veye::Project::DependencyJSON, Veye::Project::InfoJSON, Veye::Project::LicenceJSON, Veye::User::FavoriteJSON, Veye::User::ProfileJSON
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseJSON.
3
4
5
|
# File 'lib/veye/views/base_json.rb', line 3
def initialize
@results = {}
end
|
Instance Method Details
#after(paging = nil, allow_pagination = false) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/veye/views/base_json.rb', line 9
def after(paging = nil, = false)
if && !paging.nil?
@results[:paging] = paging
end
puts @results.to_json
end
|
#before ⇒ Object
7
|
# File 'lib/veye/views/base_json.rb', line 7
def before; end
|
17
18
19
|
# File 'lib/veye/views/base_json.rb', line 17
def format(results)
raise NotImplementedError
end
|