Class: PiggyOptions
- Inherits:
-
Object
- Object
- PiggyOptions
- Defined in:
- lib/piggy-core/options.rb
Overview
Provide Piggy with user defined settings.
Constant Summary collapse
- ProcessorNconvert =
possible values for @image_processor
'nconvert'
- ProcessorFxruby =
'fxruby'
- ProcessorRmagick =
'rmagick'
Instance Attribute Summary collapse
-
#addJavaFxSlideshow ⇒ Object
(also: #addJavaFxSlideshow?)
Returns the value of attribute addJavaFxSlideshow.
-
#addSlideshow ⇒ Object
(also: #addSlideshow?)
Returns the value of attribute addSlideshow.
-
#addZip ⇒ Object
(also: #addZip?)
Returns the value of attribute addZip.
-
#browser ⇒ Object
Returns the value of attribute browser.
-
#debug ⇒ Object
(also: #debug?)
Returns the value of attribute debug.
-
#excludeFilters ⇒ Object
Returns the value of attribute excludeFilters.
-
#ftpConnectionTimeout ⇒ Object
Returns the value of attribute ftpConnectionTimeout.
-
#ftpHasLocaltime ⇒ Object
(also: #ftpHasLocaltime?)
Returns the value of attribute ftpHasLocaltime.
-
#ftpHost ⇒ Object
Returns the value of attribute ftpHost.
-
#ftpTransferTimeout ⇒ Object
Returns the value of attribute ftpTransferTimeout.
-
#ftpUser ⇒ Object
Returns the value of attribute ftpUser.
-
#generateFramePage ⇒ Object
(also: #generateFramePage?)
Returns the value of attribute generateFramePage.
-
#imageHeight ⇒ Object
Returns the value of attribute imageHeight.
-
#imageWidth ⇒ Object
Returns the value of attribute imageWidth.
-
#localDestinationPath ⇒ Object
Returns the value of attribute localDestinationPath.
-
#preselectDirectories ⇒ Object
(also: #preselectDirectories?)
Returns the value of attribute preselectDirectories.
-
#remoteDestinationPath ⇒ Object
Returns the value of attribute remoteDestinationPath.
-
#skipImageProcessing ⇒ Object
Returns the value of attribute skipImageProcessing.
-
#slideshowDelay ⇒ Object
Returns the value of attribute slideshowDelay.
-
#style ⇒ Object
Returns the value of attribute style.
-
#stylesSample ⇒ Object
(also: #stylesSample?)
Returns the value of attribute stylesSample.
-
#thumbHeight ⇒ Object
Returns the value of attribute thumbHeight.
-
#thumbWidth ⇒ Object
Returns the value of attribute thumbWidth.
-
#useLog ⇒ Object
(also: #useLog?)
Returns the value of attribute useLog.
-
#usePreview ⇒ Object
(also: #usePreview?)
Returns the value of attribute usePreview.
-
#useTable ⇒ Object
(also: #useTable?)
Returns the value of attribute useTable.
Instance Method Summary collapse
- #browser? ⇒ Boolean
-
#initialize ⇒ PiggyOptions
constructor
A new instance of PiggyOptions.
-
#initialize_nils_with_default ⇒ Object
(also: #initializeNilsWithDefault)
Public init e.
- #use_fxruby! ⇒ Object
- #use_fxruby? ⇒ Boolean
- #use_nconvert! ⇒ Object
- #use_nconvert? ⇒ Boolean
- #use_rmagick! ⇒ Object
- #use_rmagick? ⇒ Boolean
Constructor Details
#initialize ⇒ PiggyOptions
Returns a new instance of PiggyOptions.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/piggy-core/options.rb', line 27 def initialize @usePreview = nil @useLog = nil @useNconvert = nil @imageProcessor = nil @thumbWidth = nil @thumbHeight = nil @imageWidth = nil @imageHeight = nil @generateFramePage = nil @useTable = nil @localDestinationPath = nil @remoteDestinationPath = nil @ftpUser = nil @ftpHost = nil @ftpHasLocaltime = nil @ftpConnectionTimeout = nil @ftpTransferTimeout = nil @addZip = nil @addSlideshow = nil @addJavaFxSlideshow = nil @preselectDirectories = nil @slideshowDelay = nil @style = nil @debug = nil @browser = nil @stylesSample = nil @excludeFilters = nil initialize_nils_with_default end |
Instance Attribute Details
#addJavaFxSlideshow ⇒ Object Also known as: addJavaFxSlideshow?
Returns the value of attribute addJavaFxSlideshow.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def addJavaFxSlideshow @addJavaFxSlideshow end |
#addSlideshow ⇒ Object Also known as: addSlideshow?
Returns the value of attribute addSlideshow.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def addSlideshow @addSlideshow end |
#addZip ⇒ Object Also known as: addZip?
Returns the value of attribute addZip.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def addZip @addZip end |
#browser ⇒ Object
Returns the value of attribute browser.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def browser @browser end |
#debug ⇒ Object Also known as: debug?
Returns the value of attribute debug.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def debug @debug end |
#excludeFilters ⇒ Object
Returns the value of attribute excludeFilters.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def excludeFilters @excludeFilters end |
#ftpConnectionTimeout ⇒ Object
Returns the value of attribute ftpConnectionTimeout.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def ftpConnectionTimeout @ftpConnectionTimeout end |
#ftpHasLocaltime ⇒ Object Also known as: ftpHasLocaltime?
Returns the value of attribute ftpHasLocaltime.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def ftpHasLocaltime @ftpHasLocaltime end |
#ftpHost ⇒ Object
Returns the value of attribute ftpHost.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def ftpHost @ftpHost end |
#ftpTransferTimeout ⇒ Object
Returns the value of attribute ftpTransferTimeout.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def ftpTransferTimeout @ftpTransferTimeout end |
#ftpUser ⇒ Object
Returns the value of attribute ftpUser.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def ftpUser @ftpUser end |
#generateFramePage ⇒ Object Also known as: generateFramePage?
Returns the value of attribute generateFramePage.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def generateFramePage @generateFramePage end |
#imageHeight ⇒ Object
Returns the value of attribute imageHeight.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def imageHeight @imageHeight end |
#imageWidth ⇒ Object
Returns the value of attribute imageWidth.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def imageWidth @imageWidth end |
#localDestinationPath ⇒ Object
Returns the value of attribute localDestinationPath.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def localDestinationPath @localDestinationPath end |
#preselectDirectories ⇒ Object Also known as: preselectDirectories?
Returns the value of attribute preselectDirectories.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def preselectDirectories @preselectDirectories end |
#remoteDestinationPath ⇒ Object
Returns the value of attribute remoteDestinationPath.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def remoteDestinationPath @remoteDestinationPath end |
#skipImageProcessing ⇒ Object
Returns the value of attribute skipImageProcessing.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def skipImageProcessing @skipImageProcessing end |
#slideshowDelay ⇒ Object
Returns the value of attribute slideshowDelay.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def @slideshowDelay end |
#style ⇒ Object
Returns the value of attribute style.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def style @style end |
#stylesSample ⇒ Object Also known as: stylesSample?
Returns the value of attribute stylesSample.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def stylesSample @stylesSample end |
#thumbHeight ⇒ Object
Returns the value of attribute thumbHeight.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def thumbHeight @thumbHeight end |
#thumbWidth ⇒ Object
Returns the value of attribute thumbWidth.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def thumbWidth @thumbWidth end |
#useLog ⇒ Object Also known as: useLog?
Returns the value of attribute useLog.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def useLog @useLog end |
#usePreview ⇒ Object Also known as: usePreview?
Returns the value of attribute usePreview.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def usePreview @usePreview end |
#useTable ⇒ Object Also known as: useTable?
Returns the value of attribute useTable.
8 9 10 |
# File 'lib/piggy-core/options.rb', line 8 def useTable @useTable end |
Instance Method Details
#browser? ⇒ Boolean
116 117 118 |
# File 'lib/piggy-core/options.rb', line 116 def browser? !@browser.nil? && !@browser.empty? end |
#initialize_nils_with_default ⇒ Object Also known as: initializeNilsWithDefault
Public init e. g. after reading some entries from an older config file.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/piggy-core/options.rb', line 60 def initialize_nils_with_default @usePreview = false if @usePreview.nil? @useLog = false if @useLog.nil? @useNconvert = false if @useNconvert.nil? if @imageProcessor.nil? @imageProcessor = (@useNconvert ? ProcessorNconvert : ProcessorFxruby) end @thumbWidth = 100 if @thumbWidth.nil? @thumbHeight = 100 if @thumbHeight.nil? @imageWidth = 600 if @imageWidth.nil? @imageHeight = 520 if @imageHeight.nil? @generateFramePage = false if @generateFramePage.nil? @useTable = generateFramePage? if @uosPathseTable.nil? @localDestinationPath = WinShell.instance.picture_directory if @localDestinationPath.nil? @remoteDestinationPath = '' if @remoteDestinationPath.nil? @ftpUser = 'anonymous' if @ftpUser.nil? @ftpHost = 'ftp.blablabla.de' if @ftpHost.nil? @ftpHasLocaltime = false if @ftpHasLocaltime.nil? @ftpConnectionTimeout = 10 if @ftpConnectionTimeout.nil? @ftpTransferTimeout = 30 if @ftpTransferTimeout.nil? @addZip = true if @addZip.nil? @addSlideshow = true if @addSlideshow.nil? @addJavaFxSlideshow = false if @addJavaFxSlideshow.nil? @preselectDirectories = true if @preselectDirectories.nil? @slideshowDelay = 5 if @slideshowDelay.nil? @style = 'shadow' if @style.nil? @debug = false if @debug.nil? @browser = '' if @browser.nil? @stylesSample = false if @stylesSample.nil? @excludeFilters = ['~$', '#$', '^\.'] if @excludeFilters.nil? end |
#use_fxruby! ⇒ Object
92 93 94 |
# File 'lib/piggy-core/options.rb', line 92 def use_fxruby! @imageProcessor = ProcessorFxruby end |
#use_fxruby? ⇒ Boolean
96 97 98 |
# File 'lib/piggy-core/options.rb', line 96 def use_fxruby? @imageProcessor == ProcessorFxruby end |
#use_nconvert! ⇒ Object
100 101 102 |
# File 'lib/piggy-core/options.rb', line 100 def use_nconvert! @imageProcessor = ProcessorNconvert end |
#use_nconvert? ⇒ Boolean
104 105 106 |
# File 'lib/piggy-core/options.rb', line 104 def use_nconvert? @imageProcessor == ProcessorNconvert end |
#use_rmagick! ⇒ Object
108 109 110 |
# File 'lib/piggy-core/options.rb', line 108 def use_rmagick! @imageProcessor = ProcessorRmagick end |
#use_rmagick? ⇒ Boolean
112 113 114 |
# File 'lib/piggy-core/options.rb', line 112 def use_rmagick? @imageProcessor == ProcessorRmagick end |