method

slice

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: Core
slice public

Returns a hash of the given methods with their names as keys and returned values as values.

topic = Topic.new(title: "Budget", author_name: "Jason")
topic.slice(:title, :author_name)
=> { "title" => "Budget", "author_name" => "Jason" }
Show source
Register or log in to add new notes.