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) ⇒ License
constructor
A new instance of License.
- #name ⇒ Object
- #text ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(data) ⇒ License
Returns a new instance of License.
497 498 499 |
# File 'lib/udb/obj/database_obj.rb', line 497 def initialize(data) @data = data end |
Instance Method Details
#name ⇒ Object
503 |
# File 'lib/udb/obj/database_obj.rb', line 503 def name = T.must(@data["name"]) |
#text ⇒ Object
512 513 514 515 516 517 518 |
# File 'lib/udb/obj/database_obj.rb', line 512 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 ⇒ Object
508 |
# File 'lib/udb/obj/database_obj.rb', line 508 def url = T.must(@data["url"]) |