@jwo
class Post!
using Permalinker!
!
def initialize(title)!
@title = title!
end!
!
def permalink!
@title.permalinkify!
end!
end
Slide 8
Slide 8 text
@jwo
"Refinements are not globally scoped".permalinkify!
!
!
!
NoMethodError: undefined method `permalinkify' for
"Refinements are not globally scoped":String
Slide 9
Slide 9 text
@jwo
Restricted
Keyword Args
Slide 10
Slide 10 text
@jwo
def order_tacos(type: 5, how_many: 'queso')!
puts "Ordering #{how_many} #{type}"!
end!
!
order_tacos type: "fajita_queso", how_many: 5
in Ruby 2.0, you HAD to specify a
default for type and how_many