Sha256: 89e189bd406dc01a3dca098a961f3fe9d8cee0677e22fe3ca15f4f34ec1636fa

Contents?: true

Size: 638 Bytes

Versions: 4

Compression:

Stored size: 638 Bytes

Contents

require 'rake'
require 'rake/tasklib'

module NetLinx
  module Rake
    module ERB
      
      # Generate NetLinx RPC file.
      class GenerateRPC < ::Rake::TaskLib
        
        attr_accessor :name
        
        def initialize name = :generate_rpc
          @name = name
          yield self if block_given?
          
          desc "Generate NetLinx RPC file."
          
          task(name) do
            require 'netlinx-erb'
            puts "\n\nGenerating RPC functions..."
            RPC.build
            puts "Done.\n\n"
          end
        end
        
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
netlinx-erb-2.0.1 lib/netlinx/rake/erb/generate_rpc.rb
netlinx-erb-2.0.0 lib/netlinx/rake/erb/generate_rpc.rb
netlinx-erb-1.1.0 lib/netlinx/rake/erb/generate_rpc.rb
netlinx-erb-1.0.0 lib/netlinx/rake/erb/generate_rpc.rb