diaspora_federation/lib/diaspora_federation.rb
Benjamin Neff f0591a745b add basic webfinger stuf (WIP)
and:
- add configure method to set some configs
- write rdoc
2015-06-14 22:13:38 +02:00

36 lines
732 B
Ruby

require "diaspora_federation/engine"
##
# diaspora* federation rails engine
module DiasporaFederation
class << self
##
# the pod url
#
# Example:
# config.server_uri = URI("http://localhost:3000/")
# or
# config.server_uri = AppConfig.pod_uri
attr_accessor :server_uri
##
# the class to use as person.
#
# Example:
# config.person_class = Person.class.to_s
attr_accessor :person_class
def person_class
const_get(@person_class)
end
##
# configure the federation engine
#
# DiasporaFederation.configure do |config|
# config.server_uri = "http://localhost:3000/"
# end
def configure
yield self
end
end
end