Class: Shart::Target
- Inherits:
-
Object
- Object
- Shart::Target
- Defined in:
- lib/shart.rb
Overview
The Target is where the content will be published.
Instance Attribute Summary collapse
-
#directory_name ⇒ Object
readonly
Returns the value of attribute directory_name.
Instance Method Summary collapse
- #directory ⇒ Object
- #files ⇒ Object
-
#initialize(directory_name, opts = {}) ⇒ Target
constructor
A new instance of Target.
- #sync(source) ⇒ Object
Constructor Details
#initialize(directory_name, opts = {}) ⇒ Target
Returns a new instance of Target.
12 13 14 15 |
# File 'lib/shart.rb', line 12 def initialize(directory_name, opts={}) @directory_name = directory_name @storage = Fog::Storage.new(opts) end |
Instance Attribute Details
#directory_name ⇒ Object (readonly)
Returns the value of attribute directory_name.
10 11 12 |
# File 'lib/shart.rb', line 10 def directory_name @directory_name end |
Instance Method Details
#directory ⇒ Object
21 22 23 |
# File 'lib/shart.rb', line 21 def directory @directory ||= @storage.directories.get(@directory_name) end |
#files ⇒ Object
17 18 19 |
# File 'lib/shart.rb', line 17 def files directory.files end |