class A
def self.f1
puts "the method of class"
end
def f2
puts "the method of instance"
end
end
A.f1
A.new.f2
class UserMailer < ApplicationMailer
def account_activation(user)
@user = user
mail(to: @user.email, subject: '激活帐号.')
end
end
UserMailer.account_activation(@user).deliver_now
UserMailer.new.account_activation(@user).deliver_now