Class: Pair
- Inherits:
-
Struct
- Object
- Struct
- Pair
- Defined in:
- lib/static_ruby.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
Returns the value of attribute first.
-
#second ⇒ Object
Returns the value of attribute second.
Instance Method Summary collapse
Instance Attribute Details
#first ⇒ Object
Returns the value of attribute first
1 2 3 |
# File 'lib/static_ruby.rb', line 1 def first @first end |
#second ⇒ Object
Returns the value of attribute second
1 2 3 |
# File 'lib/static_ruby.rb', line 1 def second @second end |
Instance Method Details
#to_a ⇒ Object
2 3 4 |
# File 'lib/static_ruby.rb', line 2 def to_a [first, second] end |
#to_s ⇒ Object
6 7 8 |
# File 'lib/static_ruby.rb', line 6 def to_s "Pair(#{first} #{second})" end |