Skip to content

Instantly share code, notes, and snippets.

@compwron
Created March 3, 2023 22:14
Show Gist options
  • Save compwron/1f5ddb1fcfb62a325b1c972ec4dae721 to your computer and use it in GitHub Desktop.
Save compwron/1f5ddb1fcfb62a325b1c972ec4dae721 to your computer and use it in GitHub Desktop.
#!/user/bin/env ruby
puts "hi"
my_variable = "hi"
puts my_variable
x = 1
puts x
puts x + 2
names = ["name", "naaaame"]
puts names
data = { name: "name" }
puts data
lots_data = [{ name: "name" }, { name: "linda" }]
lots_data.select { |x| x[:name] == "linda" }
lots_data.map { |x| x[:name] }
def some_method
1
end
def some_method2(input)
input * 2
end
def some_method3(input1, input2)
input1 + input2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment