Sha256: d0d7ba0bbc914c7e26e159765fad21e7c099279e5be551f074e0a0615a1f97d7

Contents?: true

Size: 661 Bytes

Versions: 7

Compression:

Stored size: 661 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 css
          ''
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
turnip_formatter-0.8.0 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.7.2 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.7.1 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.7.0 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.6.1 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.6.0 lib/turnip_formatter/step_template/base.rb
turnip_formatter-0.6.0.pre.beta.7 lib/turnip_formatter/step_template/base.rb