가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

Ruby On Rails 면접 질문과 답변

Ques 61. What is an object?

Textbook answer here is that an object is an instance of a class and has state, behavior, and identity. In a plain text example, you can say that a truck and a car are both objects of the class Vehicle, or that apple and pear are both objects of the class Fruit.

도움이 되었나요? Add Comment View Comments
 

Ques 62. How would you declare and use a constructor in Ruby?

Constructors are declared via the initialize method and get called when you call on a new object to be created.

Using the code snippet below, calling Order.new acts as a constructor for an object of the class Order.

class Order
  def initialize(customer, meal, beverage)
    @customer = customer
    @meal = meal
    @beverage = beverage
  end
end

도움이 되었나요? Add Comment View Comments
 

Ques 63. How does a symbol differ from a string?

Symbols are immutable and reusable, retaining the same object_id.

도움이 되었나요? Add Comment View Comments
 

Ques 64. How and when would you declare a Global Variable?

Global variables are declared with the ‘$’ symbol and can be declared and used anywhere within your program. You should use them sparingly to never.

도움이 되었나요? Add Comment View Comments
 

Ques 65. How would you create getter and setter methods in Ruby?

Setter and getter methods in Ruby are generated with the attr_accessor method. attr_accessor is used to generate instance variables for data that’s not stored in your database column.

도움이 되었나요? Add Comment View Comments
 

Most helpful rated by users:

Copyright © 2026, WithoutBook.