Class: MessagePack::IDL::IR::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/msgpack/idl/ir.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace, types, services, applications) ⇒ Spec

Returns a new instance of Spec.



24
25
26
27
28
29
# File 'lib/msgpack/idl/ir.rb', line 24

def initialize(namespace, types, services, applications)
	@namespace = namespace
	@types = types
	@services = services
	@applications = applications
end

Instance Attribute Details

#applicationsObject (readonly)

Returns the value of attribute applications.



34
35
36
# File 'lib/msgpack/idl/ir.rb', line 34

def applications
  @applications
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



31
32
33
# File 'lib/msgpack/idl/ir.rb', line 31

def namespace
  @namespace
end

#servicesObject (readonly)

Returns the value of attribute services.



33
34
35
# File 'lib/msgpack/idl/ir.rb', line 33

def services
  @services
end

#typesObject (readonly)

Returns the value of attribute types.



32
33
34
# File 'lib/msgpack/idl/ir.rb', line 32

def types
  @types
end

Instance Method Details

#enumsObject



40
41
42
# File 'lib/msgpack/idl/ir.rb', line 40

def enums
	@types.select {|t| t.is_a?(Enum) }
end

#messagesObject



36
37
38
# File 'lib/msgpack/idl/ir.rb', line 36

def messages
	@types.select {|t| t.is_a?(Message) }
end