Preguntas y respuestas de entrevista mas solicitadas y pruebas en linea
Plataforma educativa para preparacion de entrevistas, pruebas en linea, tutoriales y practica en vivo

Desarrolla tus habilidades con rutas de aprendizaje enfocadas, examenes de practica y contenido listo para entrevistas.

WithoutBook reune preguntas de entrevista por tema, pruebas practicas en linea, tutoriales y guias comparativas en un espacio de aprendizaje responsivo.

Preparar entrevista

Ruby On Rails preguntas y respuestas de entrevista

Pregunta 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.

Es util? Agregar comentario Ver comentarios
 

Pregunta 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

Es util? Agregar comentario Ver comentarios
 

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

Symbols are immutable and reusable, retaining the same object_id.

Es util? Agregar comentario Ver comentarios
 

Pregunta 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.

Es util? Agregar comentario Ver comentarios
 

Pregunta 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.

Es util? Agregar comentario Ver comentarios
 

Lo mas util segun los usuarios:

Copyright © 2026, WithoutBook.