Class: Gnawrnip::StepScreenshot
- Inherits:
-
TurnipFormatter::StepTemplate::Base
- Object
- TurnipFormatter::StepTemplate::Base
- Gnawrnip::StepScreenshot
- Defined in:
- lib/gnawrnip/step_screenshot.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.css ⇒ Object
8 9 10 |
# File 'lib/gnawrnip/step_screenshot.rb', line 8 def self.css File.read(File.dirname(__FILE__) + '/gnawrnip.css') end |
Instance Method Details
#build(step) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/gnawrnip/step_screenshot.rb', line 15 def build(step) images = step.example.[:gnawrnip][:screenshot] case images.length when 0 '' when 1 single_image(images.first) else animation_image(images) end end |