Create Named Tuple
a = {fname: "Foo", "lname": "Bar"}
puts a
puts typeof(a)
b = NamedTuple.new(fname: "Foo", "lname": "Bar")
puts b
puts typeof(b)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
a = {fname: "Foo", "lname": "Bar"}
puts a
puts typeof(a)
b = NamedTuple.new(fname: "Foo", "lname": "Bar")
puts b
puts typeof(b)