Module: Notificate::Configuration

Included in:
Notificate
Defined in:
lib/notificate/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



2
3
4
# File 'lib/notificate/configuration.rb', line 2

def options
  @options
end

Instance Method Details

#configure(opts = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/notificate/configuration.rb', line 4

def configure(opts = {})
  opts[:protocol] ||= :https
  opts[:port]     ||= 80

  @options = Notificate::ObjectifiedHash.new(opts)
end

#request_pathObject



11
12
13
# File 'lib/notificate/configuration.rb', line 11

def request_path
  "#{options.protocol}://#{options.hostname}:#{options.port}/#{options.endpoint}#{options.params}"
end