Class: W3cApi::Hal
Constant Summary collapse
- API_URL =
'https://api.w3.org/'
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize ⇒ Hal
constructor
A new instance of Hal.
- #register ⇒ Object
Constructor Details
#initialize ⇒ Hal
Returns a new instance of Hal.
12 13 14 |
# File 'lib/w3c_api/hal.rb', line 12 def initialize setup end |
Instance Method Details
#client ⇒ Object
16 17 18 |
# File 'lib/w3c_api/hal.rb', line 16 def client @client ||= Lutaml::Hal::Client.new(api_url: API_URL) end |
#register ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/w3c_api/hal.rb', line 20 def register return @register if @register @register = Lutaml::Hal::ModelRegister.new(name: :w3c_api, client: client) Lutaml::Hal::GlobalRegister.instance.register( :w3c_api, @register ) @register end |