Class: Kinu::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/kinu/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject



5
6
7
# File 'lib/kinu/configuration.rb', line 5

def host
  @host
end

#portObject



13
14
15
16
17
18
19
20
21
# File 'lib/kinu/configuration.rb', line 13

def port
  if @port
    @port
  elsif ssl?
    443
  else
    80
  end
end

#ssl=(value) ⇒ Object (writeonly)

Sets the attribute ssl

Parameters:

  • value

    the value to set the attribute ssl to.



3
4
5
# File 'lib/kinu/configuration.rb', line 3

def ssl=(value)
  @ssl = value
end

#upload_hostObject



9
10
11
# File 'lib/kinu/configuration.rb', line 9

def upload_host
  @upload_host
end

Instance Method Details

#schemeObject



27
28
29
30
31
32
33
# File 'lib/kinu/configuration.rb', line 27

def scheme
  if ssl?
    :https
  else
    :http
  end
end

#ssl?Boolean

Returns:

  • (Boolean)


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

def ssl?
  @ssl
end