Class: Barcode

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/barcode.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#start_colsObject

Returns the value of attribute start_cols.



10
11
12
# File 'app/models/barcode.rb', line 10

def start_cols
  @start_cols
end

#start_rowsObject

Returns the value of attribute start_rows.



10
11
12
# File 'app/models/barcode.rb', line 10

def start_rows
  @start_rows
end

Class Method Details

.per_pageObject



12
13
14
# File 'app/models/barcode.rb', line 12

def self.per_page
  10
end

Instance Method Details

#generate_barcodeObject



16
17
18
# File 'app/models/barcode.rb', line 16

def generate_barcode
  self.data = Barby::Code39.new(code_word).to_svg(:width => 150, :height => 70)
end

#is_readable_by(user, parent = nil) ⇒ Object



20
21
22
# File 'app/models/barcode.rb', line 20

def is_readable_by(user, parent = nil)
  true
end