Class: NetLinx::Rake::ERB::GenerateRPC

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/netlinx/rake/erb/generate_rpc.rb

Overview

Generate NetLinx RPC file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = :generate_rpc) {|_self| ... } ⇒ GenerateRPC

Returns a new instance of GenerateRPC.

Yields:

  • (_self)

Yield Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/netlinx/rake/erb/generate_rpc.rb', line 14

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



12
13
14
# File 'lib/netlinx/rake/erb/generate_rpc.rb', line 12

def name
  @name
end