Module: Metro::Views::Writers
Instance Attribute Summary collapse
-
#default_writer ⇒ Object
The default view writer, this is the one that will be used if no view can be found by the writers.
Instance Method Summary collapse
-
#register(writer) ⇒ Object
Register a view writer.
-
#writers ⇒ Array<Writers>
An array of all the registered view writers.
Instance Attribute Details
#default_writer ⇒ Object
The default view writer, this is the one that will be used if no view can be found by the writers.
33 34 35 |
# File 'lib/metro/views/writers.rb', line 33 def default_writer @default_writer end |
Instance Method Details
#register(writer) ⇒ Object
Register a view writer
A writer is any class or instance that responds to #write(view_path,content), and #format.
18 19 20 |
# File 'lib/metro/views/writers.rb', line 18 def register(writer) writers.push writer end |
#writers ⇒ Array<Writers>
Returns an array of all the registered view writers.
25 26 27 |
# File 'lib/metro/views/writers.rb', line 25 def writers @writers ||= [] end |