Class: Processor
- Inherits:
-
Object
- Object
- Processor
- Defined in:
- lib/dy.rb
Instance Attribute Summary collapse
-
#file_content ⇒ Object
writeonly
Sets the attribute file_content.
-
#source_file ⇒ Object
Returns the value of attribute source_file.
Instance Method Summary collapse
- #hash ⇒ Object
-
#initialize(source_file:, file_content: nil) ⇒ Processor
constructor
A new instance of Processor.
Constructor Details
#initialize(source_file:, file_content: nil) ⇒ Processor
Returns a new instance of Processor.
20 21 22 23 |
# File 'lib/dy.rb', line 20 def initialize(source_file:, file_content: nil) self.source_file = source_file self.file_content = file_content end |
Instance Attribute Details
#file_content=(value) ⇒ Object
Sets the attribute file_content
17 18 19 |
# File 'lib/dy.rb', line 17 def file_content=(value) @file_content = value end |
#source_file ⇒ Object
Returns the value of attribute source_file.
18 19 20 |
# File 'lib/dy.rb', line 18 def source_file @source_file end |
Instance Method Details
#hash ⇒ Object
25 26 27 28 29 |
# File 'lib/dy.rb', line 25 def hash hash = file_content process! hash hash end |