Class: Generator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Generator
show all
- Includes:
- Thor::Actions
- Defined in:
- lib/generators/generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.source_paths ⇒ Object
14
15
16
17
18
|
# File 'lib/generators/generator.rb', line 14
def self.source_paths
base_path = File.dirname(__FILE__)
%W[#{base_path}/automation/templates #{base_path}/cucumber/templates
#{base_path}/rspec/templates #{base_path}/templates #{base_path}/actions/templates ]
end
|
Instance Method Details
#args ⇒ Object
20
21
22
|
# File 'lib/generators/generator.rb', line 20
def args
initializer.first
end
|
#axe? ⇒ Boolean
61
62
63
|
# File 'lib/generators/generator.rb', line 61
def axe?
args.last
end
|
The framework is cross platform when it supports Android and iOS
29
30
31
|
# File 'lib/generators/generator.rb', line 29
def cross_platform?
args.include?('cross_platform')
end
|
#cucumber? ⇒ Boolean
24
25
26
|
# File 'lib/generators/generator.rb', line 24
def cucumber?
args.include?('cucumber')
end
|
#mobile? ⇒ Boolean
33
34
35
|
# File 'lib/generators/generator.rb', line 33
def mobile?
(args & %w[android ios cross_platform sparkling_ios]).count.positive?
end
|
#rspec? ⇒ Boolean
41
42
43
|
# File 'lib/generators/generator.rb', line 41
def rspec?
args.include?('rspec')
end
|
#selenium? ⇒ Boolean
45
46
47
|
# File 'lib/generators/generator.rb', line 45
def selenium?
args.include?('selenium')
end
|
37
38
39
|
# File 'lib/generators/generator.rb', line 37
def single_platform?
(args & %w[android ios sparkling_ios]).count.positive?
end
|
#visual? ⇒ Boolean
49
50
51
|
# File 'lib/generators/generator.rb', line 49
def visual?
args[3]
end
|
#watir? ⇒ Boolean
53
54
55
|
# File 'lib/generators/generator.rb', line 53
def watir?
args.include?('watir')
end
|
#web? ⇒ Boolean
57
58
59
|
# File 'lib/generators/generator.rb', line 57
def web?
(args & (%w[selenium watir])).count.positive?
end
|