This defines the # Float Core . This feature is part of the built-in conversion functions (a term coined by Avdi Grimm ) offered by the ruby.
" , , . , , , : - Float, nil ." , .
, Kernel # Array, , 0, 1 .
def process_post(post_or_posts)
posts = Array(post_or_posts)
posts.each do |post|
....
end
end
:
process_post("post1")
process_post(["post1", "post2"])
process_post(nil)
, - :
def process_post(post_or_post)
if post_or_post
end
end
, , API.