Property objects provide an interface for configuration options
Instance Attribute Summary collapseReturns the value of attribute default.
Returns the value of attribute name.
Returns the value of attribute required.
A new instance of 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 endInstance 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 endInstance 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