Class: ProcessingContext
- Inherits:
-
Object
- Object
- ProcessingContext
- Defined in:
- lib/flickrup/processing_context.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(file, props = {}) ⇒ ProcessingContext
constructor
A new instance of ProcessingContext.
- #with_properties(props) ⇒ Object
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
#file ⇒ Object (readonly)
Returns the value of attribute file.
2 3 4 |
# File 'lib/flickrup/processing_context.rb', line 2 def file @file end |
#properties ⇒ Object (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 |