Sha256: fe1d55dab7cea8894ac60525a0a0f296eccf68e3810b6baced9b59c69932cc70

Contents?: true

Size: 737 Bytes

Versions: 22

Compression:

Stored size: 737 Bytes

Contents

# encoding: utf-8

module Github
  class API
    class Config

      # Property objects provide an interface for configuration options
      class Property

        attr_reader :name
        attr_reader :default
        attr_reader :required

        def initialize(name, options)
          @name = name
          @default = options.fetch(:default, nil)
          @required = options.fetch(:required, nil)
          @options = options
        end

        # @api private
        def define_accessor_methods(properties)
          properties.define_reader_method(self, self.name, :public)
          properties.define_writer_method(self, "#{self.name}=", :public)
        end
      end # Property

    end # Config
  end # Api
end # Github

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
github_api2-1.0.1 lib/github_api2/api/config/property.rb
github_api2-1.0.0 lib/github_api2/api/config/property.rb
github_api-0.19.0 lib/github_api/api/config/property.rb
lingfennan-github_api-0.18.2 lib/github_api/api/config/property.rb
github_api-0.18.2 lib/github_api/api/config/property.rb
github_api-0.18.1 lib/github_api/api/config/property.rb
github_api-0.17.0 lib/github_api/api/config/property.rb
github_api-0.16.0 lib/github_api/api/config/property.rb
github_api-0.15.0 lib/github_api/api/config/property.rb
github_api-0.14.5 lib/github_api/api/config/property.rb
github_api-0.14.4 lib/github_api/api/config/property.rb
github_api-0.14.3 lib/github_api/api/config/property.rb
github_api-0.14.2 lib/github_api/api/config/property.rb
github_api-0.14.1 lib/github_api/api/config/property.rb
github_api-0.14.0 lib/github_api/api/config/property.rb
github_api-0.13.1 lib/github_api/api/config/property.rb
github_api-0.13.0 lib/github_api/api/config/property.rb
github_api-0.12.4 lib/github_api/api/config/property.rb
github_api-0.12.3 lib/github_api/api/config/property.rb
github_api-0.12.2 lib/github_api/api/config/property.rb