Class: Gzlib::Holding

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/gzlib/holding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



7
8
9
# File 'lib/gzlib/holding.rb', line 7

def info
  @info
end

#libcodeMapObject

Returns the value of attribute libcodeMap.



6
7
8
# File 'lib/gzlib/holding.rb', line 6

def libcodeMap
  @libcodeMap
end

#loanObject

Returns the value of attribute loan.



6
7
8
# File 'lib/gzlib/holding.rb', line 6

def loan
  @loan
end

#localMapObject

Returns the value of attribute localMap.



6
7
8
# File 'lib/gzlib/holding.rb', line 6

def localMap
  @localMap
end

Instance Method Details

#curlibnameObject



17
18
19
# File 'lib/gzlib/holding.rb', line 17

def curlibname
  libcodeMap[curlib]
end

#curlocalnameObject



21
22
23
# File 'lib/gzlib/holding.rb', line 21

def curlocalname
  localMap[curlocal]
end

#lib_callnoObject



25
26
27
# File 'lib/gzlib/holding.rb', line 25

def lib_callno
  [curlibname, curlocalname, callno].join ' '
end

#loan?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/gzlib/holding.rb', line 9

def loan?
  !!@loan
end

#returnDateObject



13
14
15
# File 'lib/gzlib/holding.rb', line 13

def returnDate
  Time.at loan['returnDate'] / 1000 if loan?
end