Class: Racc::UserAction
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/racc/grammar.rb |
Class Method Summary
- .new(src, proc) ⇒ UserAction constructor
Instance Attribute Summary
- #empty? ⇒ Boolean readonly
- #proc readonly
- #proc? ⇒ Boolean readonly
- #source readonly
- #source? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(src, proc) ⇒ UserAction
Instance Attribute Details
#empty? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/racc/grammar.rb', line 764
def empty? not @proc and not @source end
#proc (readonly)
[ GitHub ]# File 'lib/racc/grammar.rb', line 754
attr_reader :proc
#proc? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/racc/grammar.rb', line 760
def proc? not @source end
#source (readonly)
[ GitHub ]# File 'lib/racc/grammar.rb', line 753
attr_reader :source
#source? ⇒ Boolean (readonly)
[ GitHub ]
# File 'lib/racc/grammar.rb', line 756
def source? not @proc end
Instance Method Details
#inspect
Alias for #name.
# File 'lib/racc/grammar.rb', line 772
alias inspect name
#name Also known as: #inspect
[ GitHub ]# File 'lib/racc/grammar.rb', line 768
def name "{action type=#{@source || @proc || 'nil'}}" end