Class: ProcessingContext

Inherits:
Object
  • Object
show all
Defined in:
lib/flickrup/processing_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, props = {}) ⇒ ProcessingContext

Returns a new instance of ProcessingContext.



5
6
7
8
# File 'lib/flickrup/processing_context.rb', line 5

def initialize(file, props = {})
  @file = file
  @properties = props
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



2
3
4
# File 'lib/flickrup/processing_context.rb', line 2

def file
  @file
end

#propertiesObject (readonly)

Returns the value of attribute properties.



3
4
5
# File 'lib/flickrup/processing_context.rb', line 3

def properties
  @properties
end

Instance Method Details

#with_properties(props) ⇒ Object



10
11
12
# File 'lib/flickrup/processing_context.rb', line 10

def with_properties(props)
  ProcessingContext.new(self.file, self.properties.merge(props))
end