Sha256: 55c18a870aacbc4c0a0eac7dd57c7f3b0d308767aa48964cbb6a8b4fb2c9b835

Contents?: true

Size: 502 Bytes

Versions: 4

Compression:

Stored size: 502 Bytes

Contents

require 'neows/version'

module Neows
  class Client
    attr_accessor :base_url

    # Initializes a new Client object
    #
    # @param options [Hash]
    # @return [Neows::Client]
    def initialize(options = {})
      options.each do |key, value|
        instance_variable_set("@#{key}", value)
      end
      yield(self) if block_given?
    end

    def base_url
      @base_url ||= url
    end

    # @return [String]
    def user_agent
      "NeowsRubyGem/#{Neows::VERSION}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
neows-1.1.0 lib/neows/client.rb
neows-1.0.0 lib/neows/client.rb
neows-0.0.2 lib/neows/client.rb
neows-0.0.1 lib/neows/client.rb