Class: Repla::Print::Controller
- Inherits:
-
Controller
- Object
- Controller
- Repla::Print::Controller
- Defined in:
- lib/repla/test/packages/Print.replaplugin/Contents/Resources/lib/controller.rb
Overview
Print controller
Instance Attribute Summary
Attributes inherited from Controller
Instance Method Summary collapse
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
- #parse_line(line) ⇒ Object
Constructor Details
#initialize ⇒ Controller
Returns a new instance of Controller.
10 11 12 |
# File 'lib/repla/test/packages/Print.replaplugin/Contents/Resources/lib/controller.rb', line 10 def initialize @view = View.new end |
Instance Method Details
#parse_line(line) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/repla/test/packages/Print.replaplugin/Contents/Resources/lib/controller.rb', line 14 def parse_line(line) line.chomp! line.javascript_escape! javascript = %[addOutput('#{line}');] @view.do_javascript(javascript) end |