Sha256: 34fcef713e0432ebcf0e890e46ff4829e573611e5b6964ed022eb524f48aee21

Contents?: true

Size: 826 Bytes

Versions: 1

Compression:

Stored size: 826 Bytes

Contents

require 'guard'
require 'guard/guard'

module Guard
  class MarvFunctions < ::Guard::Guard

    def initialize(watchers=[], options={})
      super
    end

    def start
      UI.info "Copying functions over"
      copy_functions
    end

    def run_all
      UI.info "Rebuilding all functions"
      clean_copy_functions
    end

    # Called on file(s) modifications
    def run_on_change(paths)
      UI.info "Functions have changed, copying over"
      clean_copy_functions
    end

    def copy_functions
      ::Marv::Guard.builder.copy_functions
      ::Marv::Guard.builder.copy_includes
    end

    def clean_copy_functions
      ::Marv::Guard.builder.clean_functions
      ::Marv::Guard.builder.copy_functions
      ::Marv::Guard.builder.clean_includes
      ::Marv::Guard.builder.copy_includes
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
marv-0.3.0 lib/guard/marv/functions.rb