Class: Reflex::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/reflex/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



8
9
10
# File 'lib/reflex/configuration.rb', line 8

def endpoint
  @endpoint
end

#keyObject

Returns the value of attribute key.



8
9
10
# File 'lib/reflex/configuration.rb', line 8

def key
  @key
end

#secretObject

Returns the value of attribute secret.



8
9
10
# File 'lib/reflex/configuration.rb', line 8

def secret
  @secret
end

Instance Method Details

#hostnameObject



15
16
17
# File 'lib/reflex/configuration.rb', line 15

def hostname
  uri.host
end

#pathObject



19
20
21
# File 'lib/reflex/configuration.rb', line 19

def path
  uri.path
end

#portObject



23
24
25
# File 'lib/reflex/configuration.rb', line 23

def port
  uri.port || 80
end

#uriObject



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

def uri
  @uri = URI.parse(endpoint) if @uri.nil? || @uri.to_s != endpoint
  @uri
end