Skip to content
loading...

Hello, world

github logo ・1 min read  

class Person
  attr_reader :first_name, :last_name

  def initialize(first_name, last_name)
    @first_name = first_name
    @last_name = last_name
  end

  def full_name
    "#{first_name} #{last_name}"
  end

  def say_hello
    puts "hello, world! hello, dev.to! My name is #{full_name}"
  end
end

me = Person.new('Akira', 'Suenami')
me.say_hello
twitter logo DISCUSS
Classic DEV Post from Sep 11 '19

Are You a Mediocre Developer? ME TOO

Akira Suenami profile image

👋 Hey dev.to reader.

Do you prefer sans serif over serif?

You can change your font preferences in the "misc" section of your settings. ❤️