lib/ppcurses/actions/PromptAction.rb in ppcurses-0.0.20 vs lib/ppcurses/actions/PromptAction.rb in ppcurses-0.0.21

- old
+ new

@@ -1,32 +1,33 @@ require_relative 'BaseAction.rb' +#noinspection RubyResolve module PPCurses class PromptAction < BaseAction def initialize(prompt) @prompt = prompt end - def setParentAction(action) + def set_parent_action(action) @parent = action end - def xPadding() + def x_padding if @parent.nil? - return self.winPadding() + self.win_padding() else - return @parent.winPadding() + @parent.win_padding() end end - def printPrompt() - @win.setpos(@win.cury(), xPadding()) + def print_prompt + @win.setpos(@win.cury(), x_padding()) @win.addstr(@prompt) end - def execute() - printPrompt() + def execute + print_prompt() echo @data = @win.getstr() noecho end