Class: MessagePack::IDL::IR::Service

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, versions) ⇒ Service

Returns a new instance of Service.



330
331
332
333
# File 'lib/msgpack/idl/ir.rb', line 330

def initialize(name, versions)
	@name = name
	@versions = versions
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



334
335
336
# File 'lib/msgpack/idl/ir.rb', line 334

def name
  @name
end

#versionsObject

Returns the value of attribute versions.



334
335
336
# File 'lib/msgpack/idl/ir.rb', line 334

def versions
  @versions
end

Instance Method Details

#[](version) ⇒ Object



337
338
339
# File 'lib/msgpack/idl/ir.rb', line 337

def [](version)
	@versions.find {|sv| sv.version == version }
end

#versions_upto(version) ⇒ Object



341
342
343
344
345
346
# File 'lib/msgpack/idl/ir.rb', line 341

def versions_upto(version)
	@versions.each {|sv|
		break if sv.version > version
		yield sv
	}
end