I appreciate there are many already mentioned methods on Stack that you can use to find the lowest value integer, but the majority seem to be based on arrays and inbuilt ruby methods. I am tasked with finding the lowest value integer in a hash value by using flow control only. I have tried and researched multiple ways of doing this via iteration etc, and I have hit the brick wall! I need to do all of this inside of my increase method. My current code:
class Class
def initialize(object)
@object = object
end
def increase
@object
end
end
class = Class.new({first_key: 350, second_key: 200})
200
? Or:second_key
? Or{second_key: 200}
– spickermann