Class: Fastlane::Helper::WaldoReadIO
- Inherits:
-
Object
- Object
- Fastlane::Helper::WaldoReadIO
- Defined in:
- lib/fastlane/plugin/waldo/helper/waldo_helper.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(path) ⇒ WaldoReadIO
constructor
A new instance of WaldoReadIO.
- #read(length = nil, outbuf = nil) ⇒ Object
Constructor Details
#initialize(path) ⇒ WaldoReadIO
Returns a new instance of WaldoReadIO.
557 558 559 |
# File 'lib/fastlane/plugin/waldo/helper/waldo_helper.rb', line 557 def initialize(path) @fp = File.open(path) end |
Instance Method Details
#close ⇒ Object
561 562 563 |
# File 'lib/fastlane/plugin/waldo/helper/waldo_helper.rb', line 561 def close @fp.close end |
#read(length = nil, outbuf = nil) ⇒ Object
565 566 567 568 569 570 571 |
# File 'lib/fastlane/plugin/waldo/helper/waldo_helper.rb', line 565 def read(length = nil, outbuf = nil) if result = @fp.read(length, outbuf) result.force_encoding('BINARY') if result.respond_to?(:force_encoding) end result end |