Class: Smartware::Driver::Printer::Dummy
- Inherits:
-
Object
- Object
- Smartware::Driver::Printer::Dummy
- Defined in:
- lib/smartware/drivers/printer/dummy.rb
Instance Method Summary collapse
- #error ⇒ Object
-
#initialize(config) ⇒ Dummy
constructor
A new instance of Dummy.
- #model ⇒ Object
- #new_render ⇒ Object
- #print(data) ⇒ Object
- #query ⇒ Object
- #status ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(config) ⇒ Dummy
Returns a new instance of Dummy.
7 8 9 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 7 def initialize(config) end |
Instance Method Details
#error ⇒ Object
15 16 17 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 15 def error nil end |
#model ⇒ Object
19 20 21 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 19 def model 'Generic printer' end |
#new_render ⇒ Object
42 43 44 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 42 def new_render DummyRender.new end |
#print(data) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 27 def print(data) name = "smartwareprint_#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}.txt" pathname = File.join(Dir.home, name) File.open(pathname, 'w') { |io| io.write data } Logging.logger.info "Created #{pathname}" true end |
#query ⇒ Object
38 39 40 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 38 def query end |
#status ⇒ Object
11 12 13 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 11 def status :ready end |
#version ⇒ Object
23 24 25 |
# File 'lib/smartware/drivers/printer/dummy.rb', line 23 def version 'from hell' end |