Great article!
Only to remember, the last statement is always the return in a Ruby method, so you don't need to explicit call it! That's a endorsed behavior in famous style guides (github.com/rubocop-hq/ruby-style-g...)
So we can write:
# This is a ruby file containing a function called first_omnitrix.
module AzmuthFromOmniverse
NO_HARM = '0'
IS_HARMFUL = '1'
def first_omnitrix(person)
IS_HARMFUL if person!= 'ben'
end
end
# Example method
def first_omnitrix
'true'
end
# Example of Capital case
module AzmuthFromOmniverse
IS_HARMFUL = '1'
def first_omnitrix
IS_HARMFUL
end
end
Actually, I left that as a hint to cover these as a separate segment in the next article. 😅
But, I really appreciate your effort in mentioning these 😇. Keep reading.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article!
Only to remember, the last statement is always the return in a Ruby method, so you don't need to explicit call it! That's a endorsed behavior in famous style guides (github.com/rubocop-hq/ruby-style-g...)
So we can write:
Hey Vinicius Amorim de Lima,
Actually, I left that as a hint to cover these as a separate segment in the next article. 😅
But, I really appreciate your effort in mentioning these 😇. Keep reading.