Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 278 Bytes

super-magic-keyword.md

File metadata and controls

24 lines (17 loc) · 278 Bytes

Super magic keyword

class Parent
  def show_args(*args)
    p args
  end
end

class Child < Parent
  def show_args(a,b,c)
    super(a,b,c)
  end
end

Child.new.show_args(:a, :b, :c)

# Result:
# [:a, :b, :c]

View Source