Class: OasCore::Spec::License
- Inherits:
-
Object
- Object
- OasCore::Spec::License
- Includes:
- Specable
- Defined in:
- lib/oas_core/spec/license.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ License
constructor
A new instance of License.
- #oas_fields ⇒ Object
Methods included from Specable
Constructor Details
#initialize(**kwargs) ⇒ License
Returns a new instance of License.
10 11 12 13 |
# File 'lib/oas_core/spec/license.rb', line 10 def initialize(**kwargs) @name = kwargs[:name] || 'GPL 3.0' @url = kwargs[:url] || 'https://www.gnu.org/licenses/gpl-3.0.html#license-text' end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/oas_core/spec/license.rb', line 8 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/oas_core/spec/license.rb', line 8 def url @url end |
Instance Method Details
#oas_fields ⇒ Object
15 16 17 |
# File 'lib/oas_core/spec/license.rb', line 15 def oas_fields %i[name url] end |