Class: Pantograph::Actions::IsVerboseAction

Inherits:
Pantograph::Action show all
Defined in:
pantograph/lib/pantograph/actions/is_verbose.rb

Constant Summary

Constants inherited from Pantograph::Action

Pantograph::Action::AVAILABLE_CATEGORIES, Pantograph::Action::RETURN_TYPES

Documentation collapse

Class Method Summary collapse

Methods inherited from Pantograph::Action

action_name, author, category, deprecated_notes, lane_context, method_missing, other_action, return_type, sample_return_value, shell_out_should_use_bundle_exec?

Class Method Details

.authorsObject



38
39
40
41
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 38

def self.authors
  # So no one will ever forget your contribution to pantograph :) You are awesome btw!
  ['johnknapprs']
end

.available_optionsObject



24
25
26
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 24

def self.available_options
  []
end

.descriptionObject



16
17
18
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 16

def self.description
  'Returns Boolean whether `--verbose` flag was set'
end

.detailsObject



20
21
22
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 20

def self.details
  ''
end

.example_codeObject

Returns an array of string of sample usage of this action



54
55
56
57
58
59
60
61
62
63
64
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 54

def self.example_code
  [
    'if is_verbose?
       UI.important("Verbosity is turned on!")
     else
       UI.message("Verbosity is turned off!")
     end
    '

  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



43
44
45
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 43

def self.is_supported?(platform)
  true
end

.outputObject



28
29
30
31
32
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 28

def self.output
  [
    ['IS_VERBOSE', 'Boolean whether verbosity flag was set']
  ]
end

.return_valueObject



34
35
36
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 34

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



8
9
10
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 8

def self.run(params)
  Actions.lane_context[:IS_VERBOSE] = PantographCore::Globals.verbose? ? true : false
end

.step_textObject

Is printed out in the Steps: output in the terminal Return nil if you don’t want any logging in the terminal/JUnit Report



49
50
51
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 49

def self.step_text
  self.action_name
end

Instance Method Details

#categoryObject



66
67
68
69
# File 'pantograph/lib/pantograph/actions/is_verbose.rb', line 66

def category
  # Available Categories: ./pantograph/lib/pantograph/action.rb
  :misc
end