Class: TTK::Strategies::Fetch
- Includes:
- Concrete, ServiceManager
- Defined in:
- lib/ttk/strategies/Fetch.rb
Instance Attribute Summary
Attributes inherited from Strategy
Instance Method Summary collapse
- #dir=(other) ⇒ Object
-
#initialize(*a, &b) ⇒ Fetch
constructor
A new instance of Fetch.
- #resources=(other) ⇒ Object
Methods inherited from Composite
#<<, #create, #initialize_test, #new_symtbl
Methods inherited from Strategy
#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=
Constructor Details
#initialize(*a, &b) ⇒ Fetch
Returns a new instance of Fetch.
19 20 21 22 23 |
# File 'lib/ttk/strategies/Fetch.rb', line 19 def initialize ( *a, &b ) @fetch = nil @dir = nil super end |
Instance Method Details
#dir=(other) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/ttk/strategies/Fetch.rb', line 34 def dir=(other) if other.nil? @dir = nil else @dir = Pathname.new(other) unless @dir.exist? raise(Errno::ENOENT, "`#@dir' - no such file or directory") end end end |
#resources=(other) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/ttk/strategies/Fetch.rb', line 25 def resources=(other) @resources = [] other.each do |fn| p = Pathname.new(fn) next if p.absolute? @resources << p end end |