Class: Alexandria::ExportFormat
- Inherits:
 - 
      Object
      
        
- Object
 - Alexandria::ExportFormat
 
 
- Extended by:
 - GetText
 
- Includes:
 - Logging, GetText
 
- Defined in:
 - lib/alexandria/export_format.rb
 
Instance Attribute Summary collapse
- 
  
    
      #ext  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute ext.
 - 
  
    
      #message  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute message.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Logging
Instance Attribute Details
#ext ⇒ Object (readonly)
Returns the value of attribute ext.
      9 10 11  | 
    
      # File 'lib/alexandria/export_format.rb', line 9 def ext @ext end  | 
  
#message ⇒ Object (readonly)
Returns the value of attribute message.
      9 10 11  | 
    
      # File 'lib/alexandria/export_format.rb', line 9 def @message end  | 
  
#name ⇒ Object (readonly)
Returns the value of attribute name.
      9 10 11  | 
    
      # File 'lib/alexandria/export_format.rb', line 9 def name @name end  | 
  
Class Method Details
.all ⇒ Object
      16 17 18 19 20 21 22 23 24 25 26  | 
    
      # File 'lib/alexandria/export_format.rb', line 16 def self.all [ new(_("Archived ONIX XML"), "onix.tbz2", :export_as_onix_xml_archive), new(_("Archived Tellico XML"), "tc", :export_as_tellico_xml_archive), new(_("BibTeX"), "bib", :export_as_bibtex), new(_("CSV list"), "csv", :export_as_csv_list), new(_("ISBN List"), "txt", :export_as_isbn_list), new(_("iPod Notes"), nil, :export_as_ipod_notes), new(_("HTML Web Page"), nil, :export_as_html, true) ] end  | 
  
Instance Method Details
#invoke(library, sort_order, filename, *args) ⇒ Object
      28 29 30 31 32  | 
    
      # File 'lib/alexandria/export_format.rb', line 28 def invoke(library, sort_order, filename, *args) sorted = ExportLibrary.new(library, sort_order) log.debug { "Exporting library sorted by #{sort_order}" } sorted.send(@message, filename, *args) end  | 
  
#needs_preview? ⇒ Boolean
      34 35 36  | 
    
      # File 'lib/alexandria/export_format.rb', line 34 def needs_preview? @needs_preview end  |