Sha256: 04486964e29fe23ac1dcc13b91c7c67a2b181a15d87791c4f48ad70eb4d8b0c2

Contents?: true

Size: 662 Bytes

Versions: 2

Compression:

Stored size: 662 Bytes

Contents

module TurnipFormatter
  module StepTemplate
    class Base
      class << self
        def inherited(child)
          TurnipFormatter.step_templates << child.new
        end

        def on_passed(template)
          hooks[:passed] << template
        end

        def on_failed(template)
          hooks[:failed] << template
        end

        def on_pending(template)
          hooks[:pending] << template
        end

        def hooks
          @hooks ||= { passed: [], failed: [], pending: [] }
        end

        #
        # Return SCSS string that be used in this class
        #
        def scss
          ''
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
turnip_formatter-0.3.1 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.3.0 lib/turnip_formatter/step_template/base.rb