class Racc::UserAction
Attributes
Public Class Methods
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 742 def UserAction.empty new(nil, nil) end
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 748 def initialize(src, proc) @source = src @proc = proc end
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 735 def UserAction.proc(pr = nil, &block) if pr and block raise ArgumentError, "both of argument and block given" end new(nil, pr || block) end
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 731 def UserAction.source_text(src) new(src, nil) end
Public Instance Methods
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 764 def empty? not @proc and not @source end
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 768 def name "{action type=#{@source || @proc || 'nil'}}" end
Also aliased as: inspect
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 760 def proc? not @source end
Source
# File bundled-src/racc-1.8.1/lib/racc/grammar.rb, line 756 def source? not @proc end