Class: Generator

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/generators/generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_pathsObject



13
14
15
16
# File 'lib/generators/generator.rb', line 13

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]
end

Instance Method Details

#argsObject



18
19
20
# File 'lib/generators/generator.rb', line 18

def args
  initializer.first
end

#mobile_platform?Boolean



26
27
28
# File 'lib/generators/generator.rb', line 26

def mobile_platform?
  (args & %w[android ios cross_platform]).count.positive?
end

#visual_selected?Boolean



22
23
24
# File 'lib/generators/generator.rb', line 22

def visual_selected?
  initializer.first.last
end