Module: SmokeyBear

Defined in:
lib/smokey_bear.rb,
lib/smokey_bear/helpers.rb,
lib/smokey_bear/version.rb

Defined Under Namespace

Modules: Helpers

Constant Summary collapse

VERSION =
"1.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.domainObject

Returns the value of attribute domain.



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

def domain
  @domain
end

.endpointObject

Returns the value of attribute endpoint.



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

def endpoint
  @endpoint
end

.httpsObject

Returns the value of attribute https.



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

def https
  @https
end

.timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

Class Method Details

.base_urlObject



21
22
23
# File 'lib/smokey_bear.rb', line 21

def base_url
  @base_url ||= build_base_url
end

.build_base_urlObject



17
18
19
# File 'lib/smokey_bear.rb', line 17

def build_base_url
  "#{https ? "https" : "http"}://#{domain}/"
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (SmokeyBear)

    the object that the method was called on



13
14
15
# File 'lib/smokey_bear.rb', line 13

def configure
  yield self if block_given?
end