Module: Strokes::ActiveRecord
- Defined in:
- lib/strokes/active_record.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
8 9 10 |
# File 'lib/strokes/active_record.rb', line 8 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#barcode(version = nil) ⇒ Object
46 47 48 |
# File 'lib/strokes/active_record.rb', line 46 def (version = nil) File.open((version)) end |
#barcode_filename(version = nil) ⇒ Object
41 42 43 44 |
# File 'lib/strokes/active_record.rb', line 41 def (version = nil) filename = version ? "#{id}_#{version}" : "#{id}" "#{}/#{filename}.png" end |
#barcode_path ⇒ Object
37 38 39 |
# File 'lib/strokes/active_record.rb', line 37 def "#{Rails.root}/barcodes/#{self.class.to_s.tableize}" end |