Class: Skipper::File
- Inherits:
-
Object
- Object
- Skipper::File
- Defined in:
- lib/skipper/file.rb
Instance Attribute Summary collapse
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options, cli) ⇒ File
constructor
A new instance of File.
- #run(file) ⇒ Object
Constructor Details
Instance Attribute Details
#cli ⇒ Object (readonly)
Returns the value of attribute cli.
5 6 7 |
# File 'lib/skipper/file.rb', line 5 def cli @cli end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/skipper/file.rb', line 5 def @options end |
Class Method Details
.stdin_has_data? ⇒ Boolean
20 21 22 |
# File 'lib/skipper/file.rb', line 20 def self.stdin_has_data? $stdin.fcntl(Fcntl::F_GETFL, 0) == 0 end |
Instance Method Details
#run(file) ⇒ Object
24 25 26 |
# File 'lib/skipper/file.rb', line 24 def run(file) @runner.run(file.read) end |