Sha256: ce3e85e506247d6dd8e75585cb8911a188948a57a9a72b6e2a0c32e2037fbe1d
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
module Gossiper class Configuration class << self def attribute(name, default_value = nil) define_method name do instance_variable_get("@#{name}") || default_value end define_method "#{name}=" do |value| instance_variable_set("@#{name}", value.to_s) end end end attribute :default_notification_user_class attribute :default_notification_config_class attribute :notifications_root_folder attribute :notifications_test_folder def authorize_with(&block) if block_given? @authorize_with = block end @authorize_with ||= Proc.new {} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gossiper-0.1.0 | lib/gossiper/configuration.rb |