Class: SimpleAMS::Renderer
- Inherits:
-
Object
- Object
- SimpleAMS::Renderer
- Defined in:
- lib/simple_ams/renderer.rb
Defined Under Namespace
Classes: Collection
Instance Method Summary collapse
- #as_json ⇒ Object
-
#document ⇒ Object
resource decorator ?.
-
#initialize(resource, options = {}) ⇒ Renderer
constructor
A new instance of Renderer.
- #name ⇒ Object
- #to_json(*_args) ⇒ Object
Constructor Details
Instance Method Details
#as_json ⇒ Object
18 19 20 |
# File 'lib/simple_ams/renderer.rb', line 18 def as_json .adapter.klass.new(document, .adapter.).as_json end |
#document ⇒ Object
resource decorator ?
10 11 12 |
# File 'lib/simple_ams/renderer.rb', line 10 def document @document ||= SimpleAMS::Document.new() end |
#name ⇒ Object
14 15 16 |
# File 'lib/simple_ams/renderer.rb', line 14 def name @options.name end |
#to_json(*_args) ⇒ Object
22 23 24 |
# File 'lib/simple_ams/renderer.rb', line 22 def to_json(*_args) as_json.to_json end |