Class: Udb::License
- Inherits:
-
Object
- Object
- Udb::License
- Extended by:
- T::Sig
- Defined in:
- lib/udb/obj/database_obj.rb
Overview
License information
Instance Method Summary collapse
- #initialize(data) constructor
-
#name ⇒ String
License name.
-
#text ⇒ String
Text of the license.
- #url ⇒ nil, String
Constructor Details
#initialize(data)
478 479 480 |
# File 'lib/udb/obj/database_obj.rb', line 478 def initialize(data) @data = data end |
Instance Method Details
#name ⇒ String
Returns License name.
484 |
# File 'lib/udb/obj/database_obj.rb', line 484 def name = T.must(@data["name"]) |
#text ⇒ String
Returns Text of the license.
493 494 495 496 497 498 499 |
# File 'lib/udb/obj/database_obj.rb', line 493 def text if !@data["text_url"].nil? Net::HTTP.get(URI(T.must(@data["text_url"]))) else @data["text"] end end |
#url ⇒ nil, String
489 |
# File 'lib/udb/obj/database_obj.rb', line 489 def url = T.must(@data["url"]) |