Sha256: 36bfeca8b7d582b03e2c84fb63d283b9d5bd0e258e5610fe7f7c31de85901dd6
Contents?: true
Size: 587 Bytes
Versions: 8
Compression:
Stored size: 587 Bytes
Contents
# frozen_string_literal: true module LightspeedRestaurantClient class Configuration attr_reader :api_token, :base_uri def initialize(api_token, base_uri) @api_token = api_token @base_uri = base_uri end def with(attributes) attributes_with_string_keys = {} attributes.dup.each_pair do |name, value| attributes_with_string_keys[name.to_s] = value end self.class.new( attributes_with_string_keys.fetch('api_token', api_token), attributes_with_string_keys.fetch('base_uri', base_uri) ) end end end
Version data entries
8 entries across 8 versions & 1 rubygems