A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://rubydoc.info/github/piotrmurach/github/master/Github/API/Config/Property below:

Property – Documentation for piotrmurach/github (master) – RubyDoc.info

Class: Github::API::Config::Property
Inherits:
Object show all
Defined in:
lib/github_api/api/config/property.rb
Overview

Property objects provide an interface for configuration options

Instance Attribute Summary collapse Instance Method Summary collapse Constructor Details #initialize(name, options) ⇒ Property

Returns a new instance of Property.

14
15
16
17
18
19
# File 'lib/github_api/api/config/property.rb', line 14

def initialize(name, options)
  @name = name
  @default = options.fetch(:default, nil)
  @required = options.fetch(:required, nil)
  @options = options
end
Instance Attribute Details #default ⇒ Object

Returns the value of attribute default.

11
12
13
# File 'lib/github_api/api/config/property.rb', line 11

def default
  @default
end
#name ⇒ Object

Returns the value of attribute name.

10
11
12
# File 'lib/github_api/api/config/property.rb', line 10

def name
  @name
end
#required ⇒ Object

Returns the value of attribute required.

12
13
14
# File 'lib/github_api/api/config/property.rb', line 12

def required
  @required
end
Instance Method Details #define_accessor_methods(properties) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

22
23
24
25
# File 'lib/github_api/api/config/property.rb', line 22

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4