Class: SystemTester::Stair

Inherits:
Step show all
Includes:
Fileable
Defined in:
app/models/system_tester/stair.rb

Constant Summary

Constants inherited from Step

SystemTester::Step::INDENT

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Step

args, #bg_css, friendly_type, #friendly_type, leafs, parent_type, #parent_type, parent_types, #text_css, text_css

Class Method Details

.bg_cssObject



36
37
38
# File 'app/models/system_tester/stair.rb', line 36

def self.bg_css
  "deep-purple"
end

Instance Method Details

#iconObject



32
33
34
# File 'app/models/system_tester/stair.rb', line 32

def icon
  "clear_all"
end

#method_nameObject



28
29
30
# File 'app/models/system_tester/stair.rb', line 28

def method_name
  stripped_title.underscore
end

#moduleObject Also known as: code_to_write



15
16
17
18
19
20
21
# File 'app/models/system_tester/stair.rb', line 15

def module
  str = ""
  str << open
  str << steps.map(&:to_s).join("")
  str << close
  str
end

#module_nameObject



24
25
26
# File 'app/models/system_tester/stair.rb', line 24

def module_name
  stripped_title.camelize
end

#to_sObject



11
12
13
# File 'app/models/system_tester/stair.rb', line 11

def to_s
  "#{INDENT}# Stair: #{title}\n#{INDENT}#{method_name}\n\n"
end