Class: InstDataShipper::Destinations::ConfigURI

Inherits:
Object
  • Object
show all
Defined in:
lib/inst_data_shipper/destinations/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ ConfigURI

Returns a new instance of ConfigURI.



110
111
112
# File 'lib/inst_data_shipper/destinations/base.rb', line 110

def initialize(uri)
  @uri = uri
end

Instance Method Details

#hash_paramsObject



121
122
123
# File 'lib/inst_data_shipper/destinations/base.rb', line 121

def hash_params
  @hash_params ||= ((fragment.present? && fragment.match?(/^\w+=/) && Rack::Utils.parse_nested_query(fragment).with_indifferent_access).presence || fragment || nil)&.freeze
end

#paramsObject



117
118
119
# File 'lib/inst_data_shipper/destinations/base.rb', line 117

def params
  @params ||= (query.present? ? Rack::Utils.parse_nested_query(query).with_indifferent_access : {}).freeze
end