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)
485 486 487 |
# File 'lib/udb/obj/database_obj.rb', line 485 def initialize(data) @data = data end |
Instance Method Details
#name ⇒ String
Returns License name.
491 |
# File 'lib/udb/obj/database_obj.rb', line 491 def name = T.must(@data["name"]) |
#text ⇒ String
Returns Text of the license.
500 501 502 503 504 505 506 |
# File 'lib/udb/obj/database_obj.rb', line 500 def text if !@data["text_url"].nil? T.must(Net::HTTP.get(URI(T.must(@data["text_url"])))) else T.cast(@data.fetch("text"), String) end end |
#url ⇒ nil, String
496 |
# File 'lib/udb/obj/database_obj.rb', line 496 def url = T.must(@data["url"]) |