Method: Mudbug#initialize

Defined in:
lib/mudbug.rb

#initialize(host = 'localhost', options = {}) {|_self| ... } ⇒ Mudbug

Returns a new instance of Mudbug.

Yields:

  • (_self)

Yield Parameters:

  • _self (Mudbug)

    the object that the method was called on



88
89
90
91
92
93
94
95
# File 'lib/mudbug.rb', line 88

def initialize(host = 'localhost', options = {})
  @host = host
  https = options.delete(:https)
  @protocol = https ? 'https' : 'http'
  @options = options
  accept :json, :html, :text
  yield self if block_given?
end