Class: Tomograph::Tomogram
- Inherits:
-
String
- Object
- String
- Tomograph::Tomogram
- Defined in:
- lib/tomograph/tomogram.rb
Class Method Summary collapse
Class Method Details
.delete_query_and_last_slash(path) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/tomograph/tomogram.rb', line 17 def delete_query_and_last_slash(path) path = delete_till_the_end(path, '{&') path = delete_till_the_end(path, '{?') remove_the_slash_at_the_end(path) end |
.json ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/tomograph/tomogram.rb', line 6 def json single_sharp = find_resource result = single_sharp['content'].inject([]) do |result, resource| next result if text_node?(resource) result.concat(extract_actions(resource)) end MultiJson.dump(result) end |