My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Q1. What does Perimeter::Array.new means? Q2 What is array.new here? Q3 What does our_array.class means? Q4 What is p here means?

Manish pamnani's photo
Manish pamnani
·Jun 22, 2017
module Perimeter
  class Array
    def initialize
      @size = 400
    end
  end
end

our_array = Perimeter::Array.new
ruby_array = Array.new

p our_array.class
p ruby_array.class

STDOUT:

Perimeter::Array
Array