class Mastercraft::Greeting

Public Class Methods

new(time) click to toggle source
# File lib/mastercraft/greeting.rb, line 3
def initialize(time)
    @time = time
end

Public Instance Methods

greet() click to toggle source
# File lib/mastercraft/greeting.rb, line 7
def greet
    @time.hour <= 18 ? "Good afternoon!" : "Good evening!"
end