Class: ServiceContract::Avro::Service
Instance Attribute Summary
#version
Class Method Summary
collapse
Instance Method Summary
collapse
find, #initialize, #protocol
Class Method Details
.all ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/service_contract/avro/service.rb', line 5
def all
@all ||= begin
Dir.glob(File.join(data_dir, "*")).map do |filepath|
new(File.basename(filepath).to_s)
end
end
end
|
.data_dir ⇒ Object
13
14
15
|
# File 'lib/service_contract/avro/service.rb', line 13
def data_dir
raise :not_implemented
end
|
.description ⇒ Object
21
22
23
|
# File 'lib/service_contract/avro/service.rb', line 21
def description
""
end
|
.title ⇒ Object
17
18
19
|
# File 'lib/service_contract/avro/service.rb', line 17
def title
"Avro Service"
end
|
Instance Method Details
#data_dir ⇒ Object
40
41
42
|
# File 'lib/service_contract/avro/service.rb', line 40
def data_dir
File.join(self.class.data_dir, version, "compiled")
end
|
#path ⇒ Object
36
37
38
|
# File 'lib/service_contract/avro/service.rb', line 36
def path
"/#{version}"
end
|
#protocols ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/service_contract/avro/service.rb', line 27
def protocols
@protocols ||= begin
Dir.glob(File.join(data_dir, "*.avpr")).map do |filepath|
name = File.basename(filepath, ".avpr")
Protocol.new(name, self)
end
end
end
|