Module: IDL::Ruby::ScannerMixin

Defined in:
lib/ridlbe/ruby/config.rb

Constant Summary collapse

RUBYKW =
%w(__FILE__ and def end in or self unless __LINE__ begin defined? ensure module redo
super until BEGIN break do false next rescue then when END case else for nil retry true while
alias class elsif if not return undef yield).collect! { |w| w.to_sym }

Instance Method Summary collapse

Instance Method Details

#chk_identifier(ident) ⇒ Object



324
325
326
327
# File 'lib/ridlbe/ruby/config.rb', line 324

def chk_identifier(ident)
  # prefix Ruby keywords with 'r_'
  RUBYKW.include?(ident.to_sym) ? 'r_' + ident : ident
end