Class: SolidusFeeds::Publishers::StaticFile
- Inherits:
-
Object
- Object
- SolidusFeeds::Publishers::StaticFile
- Defined in:
- lib/solidus_feeds/publishers/static_file.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #call(&block) ⇒ Object
-
#initialize(path:) ⇒ StaticFile
constructor
A new instance of StaticFile.
Constructor Details
#initialize(path:) ⇒ StaticFile
Returns a new instance of StaticFile.
8 9 10 |
# File 'lib/solidus_feeds/publishers/static_file.rb', line 8 def initialize(path:) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/solidus_feeds/publishers/static_file.rb', line 6 def path @path end |
Instance Method Details
#call(&block) ⇒ Object
12 13 14 |
# File 'lib/solidus_feeds/publishers/static_file.rb', line 12 def call(&block) File.open(path, 'w', &block) end |