Class: NetLinx::Rake::ERB::GenerateRPC
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- NetLinx::Rake::ERB::GenerateRPC
- Defined in:
- lib/netlinx/rake/erb/generate_rpc.rb
Overview
Generate NetLinx RPC file.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = :generate_rpc) {|_self| ... } ⇒ GenerateRPC
constructor
A new instance of GenerateRPC.
Constructor Details
#initialize(name = :generate_rpc) {|_self| ... } ⇒ GenerateRPC
Returns a new instance of GenerateRPC.
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
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/netlinx/rake/erb/generate_rpc.rb', line 12 def name @name end |