class EmuPower::Commands::BasicCommand
Helper class for defining basic commands easily. Uses the current class name to define the Command
Name element of the output XML.
Public Class Methods
new()
click to toggle source
Calls superclass method
EmuPower::Commands::Command::new
# File lib/emu_power/commands.rb, line 39 def initialize class_name = self.class.name.split('::').last command_name = class_name .gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2') .gsub(/([a-z\d])([A-Z])/,'\1_\2') .tr("-", "_") .downcase super(command_name) end