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
12
13
14
15
16
|
# File 'lib/generators/generator.rb', line 12
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
#android? ⇒ Boolean
43
44
45
|
# File 'lib/generators/generator.rb', line 43
def android?
args.include?('android')
end
|
#args ⇒ Object
18
19
20
|
# File 'lib/generators/generator.rb', line 18
def args
initializer.first
end
|
#axe? ⇒ Boolean
67
68
69
|
# File 'lib/generators/generator.rb', line 67
def axe?
args.include?('axe')
end
|
The framework is cross platform when it supports Android and iOS
27
28
29
|
# File 'lib/generators/generator.rb', line 27
def cross_platform?
args.include?('cross_platform')
end
|
#cucumber? ⇒ Boolean
22
23
24
|
# File 'lib/generators/generator.rb', line 22
def cucumber?
args.include?('cucumber')
end
|
#ios? ⇒ Boolean
39
40
41
|
# File 'lib/generators/generator.rb', line 39
def ios?
args.include?('ios')
end
|
#mobile? ⇒ Boolean
31
32
33
|
# File 'lib/generators/generator.rb', line 31
def mobile?
(args & %w[android ios cross_platform]).count.positive?
end
|
#rspec? ⇒ Boolean
47
48
49
|
# File 'lib/generators/generator.rb', line 47
def rspec?
args.include?('rspec')
end
|
#selenium? ⇒ Boolean
51
52
53
|
# File 'lib/generators/generator.rb', line 51
def selenium?
args.include?('selenium')
end
|
#selenium_based? ⇒ Boolean
71
72
73
|
# File 'lib/generators/generator.rb', line 71
def selenium_based?
(args & %w[selenium axe applitools]).count.positive?
end
|
35
36
37
|
# File 'lib/generators/generator.rb', line 35
def single_platform?
(args & %w[android ios]).count.positive?
end
|
#visual? ⇒ Boolean
55
56
57
|
# File 'lib/generators/generator.rb', line 55
def visual?
args.include?('applitools')
end
|
#watir? ⇒ Boolean
59
60
61
|
# File 'lib/generators/generator.rb', line 59
def watir?
args.include?('watir')
end
|
#web? ⇒ Boolean
63
64
65
|
# File 'lib/generators/generator.rb', line 63
def web?
(args & (%w[selenium watir axe applitools])).count.positive?
end
|