Class: C2eCore::Drops::PrinterDrop

Inherits:
BaseDrop
  • Object
show all
Defined in:
/build/app/mailers/c2e_core/drops/printer_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(printer, raw_state_code) ⇒ PrinterDrop

Returns a new instance of PrinterDrop.



6
7
8
9
10
# File '/build/app/mailers/c2e_core/drops/printer_drop.rb', line 6

def initialize(printer, raw_state_code)
  super()
  @printer = printer
  @raw_state_code = raw_state_code
end

Instance Method Details

#nameString

Returns - Name of printer. E.g.: “Kiosek Pizza Express - Kuželna”.

Returns:

  • (String)
    • Name of printer. E.g.: “Kiosek Pizza Express - Kuželna”.



13
14
15
# File '/build/app/mailers/c2e_core/drops/printer_drop.rb', line 13

def name
  @printer.name
end

#raw_state_codeString

Returns - The printer’s raw state code. E.g.: “PAPER_CUT_IS_ABNORMAL”.

Returns:

  • (String)
    • The printer’s raw state code. E.g.: “PAPER_CUT_IS_ABNORMAL”.



18
19
20
# File '/build/app/mailers/c2e_core/drops/printer_drop.rb', line 18

def raw_state_code
  @raw_state_code
end