Class: SolidusFeeds::Publishers::StaticFile

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_feeds/publishers/static_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject (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