Class: Resourceful::Resource

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

Instance Method Summary collapse

Instance Method Details

#host_with_portObject



253
254
255
256
# File 'lib/core_ext.rb', line 253

def host_with_port
  add = Addressable::URI.parse(uri)
  !add.port.nil? && add.port != 80 ? [add.host, add.port].join(':') : add.host
end

#options(header = {}) ⇒ Object



249
250
251
# File 'lib/core_ext.rb', line 249

def options(header = {})
  request(:options, nil, header)
end