Class: Label
- Inherits:
-
Object
- Object
- Label
- Defined in:
- lib/goto.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(sym) ⇒ Object
-
#initialize(name, block) ⇒ Label
constructor
A new instance of Label.
Constructor Details
#initialize(name, block) ⇒ Label
Returns a new instance of Label.
7 8 9 10 |
# File 'lib/goto.rb', line 7 def initialize(name, block); @name = name @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
5 6 7 |
# File 'lib/goto.rb', line 5 def block @block end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/goto.rb', line 4 def name @name end |
Instance Method Details
#==(sym) ⇒ Object
12 13 14 |
# File 'lib/goto.rb', line 12 def ==(sym) @name == sym end |