Class: TTK::Strategies::Authors
- Includes:
- Concrete
- Defined in:
- lib/ttk/strategies/Authors.rb
Instance Attribute Summary
Attributes inherited from Strategy
Instance Method Summary collapse
Methods inherited from Strategy
#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=
Constructor Details
This class inherits a constructor from TTK::Strategies::Strategy
Instance Method Details
#run_impl ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ttk/strategies/Authors.rb', line 14 def run_impl = "#{@dir}/#{@file}" unless File.exists?() fail "No '#{}' file found" end = [] IO.foreach() do |line| << $1 if line =~ /^\* ([-a-z]{1,6}_[-_a-zA-Z\d]).*$/ end unless .include?(@author) fail "AUTHORS not well formatted" end pass end |