Files
once-campfire/app/models/purchaser.rb
Kevin McConnell df76a227dc Hello world
First open source release of Campfire 🎉
2025-08-21 09:31:59 +01:00

20 lines
337 B
Ruby

class Purchaser
def initialize
load_configuration
end
def registered?
@purchased_by.present?
end
def name
@purchased_by["name"] if registered?
end
private
def load_configuration
path = Rails.root.join("config/purchased_by.yml")
@purchased_by = YAML.load_file(path) if path.exist?
end
end