Class: Apiwork::Introspection::API::Info::License
- Inherits:
-
Object
- Object
- Apiwork::Introspection::API::Info::License
- Defined in:
- lib/apiwork/introspection/api/info/license.rb
Overview
Wraps API license information.
Instance Method Summary collapse
-
#initialize(dump) ⇒ License
constructor
A new instance of License.
-
#name ⇒ String?
The license name.
-
#to_h ⇒ Hash
Converts this license to a hash.
-
#url ⇒ String?
The license URL.
Constructor Details
#initialize(dump) ⇒ License
Returns a new instance of License.
15 16 17 |
# File 'lib/apiwork/introspection/api/info/license.rb', line 15 def initialize(dump) @dump = dump end |
Instance Method Details
#name ⇒ String?
The license name.
23 24 25 |
# File 'lib/apiwork/introspection/api/info/license.rb', line 23 def name @dump[:name] end |
#to_h ⇒ Hash
Converts this license to a hash.
39 40 41 42 43 44 |
# File 'lib/apiwork/introspection/api/info/license.rb', line 39 def to_h { name: name, url: url, } end |
#url ⇒ String?
The license URL.
31 32 33 |
# File 'lib/apiwork/introspection/api/info/license.rb', line 31 def url @dump[:url] end |