module ShareNotify
Encapsulates the response from the SHARE Search api
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/share_notify.rb, line 24 def config if @config.nil? configure(File.join(root.to_s, 'config', 'share_notify.yml')) end @config end
configure(value)
click to toggle source
# File lib/share_notify.rb, line 14 def configure(value) if value.nil? || value.is_a?(Hash) @config = value elsif value.is_a?(String) @config = YAML.load(File.read(value)) else fail InitializationError, "Unrecognized configuration: #{value.inspect}" end end
root()
click to toggle source
# File lib/share_notify.rb, line 31 def root return File.dirname(__dir__) unless defined?(Rails) Rails.root end