Class: MessagePack::IDL::IR::Service
- Inherits:
-
Object
- Object
- MessagePack::IDL::IR::Service
- Defined in:
- lib/msgpack/idl/ir.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#versions ⇒ Object
Returns the value of attribute versions.
Instance Method Summary collapse
- #[](version) ⇒ Object
-
#initialize(name, versions) ⇒ Service
constructor
A new instance of Service.
- #versions_upto(version) ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
334 335 336 |
# File 'lib/msgpack/idl/ir.rb', line 334 def name @name end |
#versions ⇒ Object
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 |