Class: APDM::Saxo
- Inherits:
-
Object
- Object
- APDM::Saxo
- Defined in:
- lib/apdm/saxo.rb,
lib/apdm/saxo/iptc.rb,
lib/apdm/saxo/remote.rb,
lib/apdm/saxo/metadata.rb
Defined Under Namespace
Classes: IPTC, InvalidConfig, Metadata, Remote
Class Attribute Summary collapse
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#remote_dir ⇒ Object
Returns the value of attribute remote_dir.
-
#server ⇒ Object
Returns the value of attribute server.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Saxo
constructor
A new instance of Saxo.
- #transfer(photo) ⇒ Object
- #write(metadata) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Saxo
Returns a new instance of Saxo.
26 27 28 29 30 31 32 33 |
# File 'lib/apdm/saxo.rb', line 26 def initialize( = {}) .each {|k,v| validate(k, v)} self.server = [:server] || ['server'] self.username = [:username] || ['username'] self.password = [:password] || ['password'] self.remote_dir = ([:remote_dir] || ['remote_dir']).upcase end |
Class Attribute Details
.logger ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/apdm/saxo.rb', line 16 def logger unless @logger FileUtils.mkdir('log') unless File.exists?('log') @logger = Logger.new('log/saxo.log') end @logger end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
25 26 27 |
# File 'lib/apdm/saxo.rb', line 25 def password @password end |
#remote_dir ⇒ Object
Returns the value of attribute remote_dir.
25 26 27 |
# File 'lib/apdm/saxo.rb', line 25 def remote_dir @remote_dir end |
#server ⇒ Object
Returns the value of attribute server.
25 26 27 |
# File 'lib/apdm/saxo.rb', line 25 def server @server end |
#username ⇒ Object
Returns the value of attribute username.
25 26 27 |
# File 'lib/apdm/saxo.rb', line 25 def username @username end |