Class: Ciphr::Functions::Reader::FileReader
- Defined in:
- lib/ciphr/functions/reader.rb
Instance Attribute Summary
Attributes inherited from Function
Instance Method Summary collapse
Methods inherited from Function
aligned, inherited, #initialize, invertable?, params, #prepend, #read, variants
Constructor Details
This class inherits a constructor from Ciphr::Functions::Function
Instance Method Details
#apply ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/ciphr/functions/reader.rb', line 26 def apply f = File.open([:file], "r") f.binmode Proc.new do chunk = f.read(256) f.close if ! chunk chunk end end |