Class: TTK::Strategies::Fetcher

Inherits:
Composite show all
Includes:
Concrete, ServiceManager
Defined in:
lib/ttk/strategies/Fetcher.rb

Instance Attribute Summary

Attributes inherited from Strategy

#status, #symtbl

Instance Method Summary collapse

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) ⇒ Fetcher

Returns a new instance of Fetcher.



18
19
20
21
22
# File 'lib/ttk/strategies/Fetcher.rb', line 18

def initialize ( *a, &b )
  @fetcher = nil
  @service = nil
  super
end

Instance Method Details

#dir=(other) ⇒ Object



32
33
34
35
36
37
38
39
40
41
# File 'lib/ttk/strategies/Fetcher.rb', line 32

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

#uri=(other) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/ttk/strategies/Fetcher.rb', line 24

def uri=(other)
  if other.nil?
    @uri = other
  else
    @uri = URI.parse(other)
  end
end