Class: Barcode
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Barcode
- Defined in:
- app/models/barcode.rb
Instance Attribute Summary collapse
-
#start_cols ⇒ Object
Returns the value of attribute start_cols.
-
#start_rows ⇒ Object
Returns the value of attribute start_rows.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#start_cols ⇒ Object
Returns the value of attribute start_cols.
10 11 12 |
# File 'app/models/barcode.rb', line 10 def start_cols @start_cols end |
#start_rows ⇒ Object
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_page ⇒ Object
12 13 14 |
# File 'app/models/barcode.rb', line 12 def self.per_page 10 end |
Instance Method Details
#generate_barcode ⇒ Object
16 17 18 |
# File 'app/models/barcode.rb', line 16 def 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 |