mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Rename util class, add first usage
This commit is contained in:
parent
45dfa57529
commit
a0d0ce3e00
5 changed files with 33 additions and 22 deletions
|
@ -1,6 +1,7 @@
|
|||
module Xsd
|
||||
class Util < ApplicationService
|
||||
class Schema < ApplicationService
|
||||
SCHEMA_PATH = 'lib/schemas/'.freeze
|
||||
BASE_URL = 'https://epp.tld.ee/schema/'.freeze
|
||||
|
||||
attr_reader :xsd_schemas, :for_prefix
|
||||
|
||||
|
@ -10,8 +11,13 @@ module Xsd
|
|||
@xsd_schemas = Dir.entries(schema_path).select { |f| File.file? File.join(schema_path, f) }
|
||||
end
|
||||
|
||||
def self.filename(*args, &block)
|
||||
new(*args, &block).call
|
||||
end
|
||||
|
||||
def call
|
||||
latest(for_prefix)
|
||||
filename = latest(for_prefix)
|
||||
BASE_URL + filename
|
||||
end
|
||||
|
||||
private
|
Loading…
Add table
Add a link
Reference in a new issue