Sha256: 337e67636b0a0e2c305411d8950269594f7119c1df07133c5fa44d1558e6e91b
Contents?: true
Size: 722 Bytes
Versions: 10
Compression:
Stored size: 722 Bytes
Contents
module Cloudfuji class Base class << self url_pairs = { :unity=>[:valid, :exists, :invite, :pending_invites, :remove, :notify], :email=>[:send, :allowed] } def notify_user_url "#{Cloudfuji::Platform.host}/notifications.json" end # NOTE Cannot use define_singleton_method since ruby 1.8 compatibility is a must url_pairs.each_pair do |prefix, method_names| method_names.each do |method_name| define_method "#{method_name}_#{prefix}_url".to_sym do "#{Cloudfuji::Platform.host}/#{prefix}/#{Cloudfuji::Config.api_version}/#{method_name}" end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems