Class: EsuApi::Extent
- Inherits:
-
Object
- Object
- EsuApi::Extent
- Defined in:
- lib/EsuApi.rb
Instance Attribute Summary collapse
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize(offset, size) ⇒ Extent
constructor
A new instance of Extent.
- #to_s ⇒ Object
Constructor Details
#initialize(offset, size) ⇒ Extent
Returns a new instance of Extent.
932 933 934 935 |
# File 'lib/EsuApi.rb', line 932 def initialize( offset, size ) @offset = offset @size = size end |
Instance Attribute Details
#offset ⇒ Object
Returns the value of attribute offset.
942 943 944 |
# File 'lib/EsuApi.rb', line 942 def offset @offset end |
#size ⇒ Object
Returns the value of attribute size.
942 943 944 |
# File 'lib/EsuApi.rb', line 942 def size @size end |
Instance Method Details
#to_s ⇒ Object
937 938 939 940 |
# File 'lib/EsuApi.rb', line 937 def to_s() eend = offset + size - 1 return "Bytes=#{offset}-#{eend}" end |