Class: Glark::InputSpec
- Inherits:
-
Object
- Object
- Glark::InputSpec
- Defined in:
- lib/glark/input/spec.rb
Direct Known Subclasses
Constant Summary collapse
- VALID_BINARY_FILE_TYPES =
[ 'text', 'without-match', 'skip', 'binary', 'list', 'decompress', 'read' ]
Instance Attribute Summary collapse
-
#binary_files ⇒ Object
how to handle binary files.
-
#dir_criteria ⇒ Object
Returns the value of attribute dir_criteria.
-
#directory ⇒ Object
read, skip, or recurse, a la grep.
-
#exclude_matching ⇒ Object
exclude files whose names match the expression.
-
#file_criteria ⇒ Object
Returns the value of attribute file_criteria.
-
#max_depth ⇒ Object
Returns the value of attribute max_depth.
-
#range ⇒ Object
range to start and stop searching; nil => the entire file.
-
#split_as_path ⇒ Object
use file arguments as path elements.
Instance Method Summary collapse
-
#initialize ⇒ InputSpec
constructor
A new instance of InputSpec.
Constructor Details
#initialize ⇒ InputSpec
Returns a new instance of InputSpec.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/glark/input/spec.rb', line 23 def initialize @binary_files = 'skip' @directory = 'list' @exclude_matching = false @range = Range.new @split_as_path = true @file_criteria = FileCriteriaOpts.new @dir_criteria = DirCriteriaOpts.new nil @max_depth = 0 # list directories $/ = "\n" end |
Instance Attribute Details
#binary_files ⇒ Object
how to handle binary files
13 14 15 |
# File 'lib/glark/input/spec.rb', line 13 def binary_files @binary_files end |
#dir_criteria ⇒ Object
Returns the value of attribute dir_criteria.
19 20 21 |
# File 'lib/glark/input/spec.rb', line 19 def dir_criteria @dir_criteria end |
#directory ⇒ Object
read, skip, or recurse, a la grep
14 15 16 |
# File 'lib/glark/input/spec.rb', line 14 def directory @directory end |
#exclude_matching ⇒ Object
exclude files whose names match the expression
15 16 17 |
# File 'lib/glark/input/spec.rb', line 15 def exclude_matching @exclude_matching end |
#file_criteria ⇒ Object
Returns the value of attribute file_criteria.
20 21 22 |
# File 'lib/glark/input/spec.rb', line 20 def file_criteria @file_criteria end |
#max_depth ⇒ Object
Returns the value of attribute max_depth.
21 22 23 |
# File 'lib/glark/input/spec.rb', line 21 def max_depth @max_depth end |
#range ⇒ Object
range to start and stop searching; nil => the entire file
16 17 18 |
# File 'lib/glark/input/spec.rb', line 16 def range @range end |
#split_as_path ⇒ Object
use file arguments as path elements
17 18 19 |
# File 'lib/glark/input/spec.rb', line 17 def split_as_path @split_as_path end |