Module: Sal::Command
- Defined in:
- lib/sal/command.rb
Overview
Checks if the code line to test is a line of code or other stuff (window parameters, …)
Constant Summary collapse
- @@commands =
{ :break => "Break", :call => "Call", :case => "Case", # => Select Case :default => "Default", # => Select Case :else => "Else", :else_if => "Else If", :if => "If", :loop => "Loop", :on => "On", :return => "Return", :select_case => "Select Case", :set => "Set", :when => "When", :while => "While" }
Class Method Summary collapse
-
.is_code_line?(line) ⇒ Boolean
Checks if the line of code is code or other stuff with using of the @@commands array, that includes the source code starts.
Class Method Details
.is_code_line?(line) ⇒ Boolean
Checks if the line of code is code or other stuff with using of the @@commands array, that includes the source code starts
26 27 28 29 30 31 |
# File 'lib/sal/command.rb', line 26 def Command.is_code_line?(line) @@commands.each_value do | command | return true if line.start_with? "#{command} " end return false end |