Class: Exlibris::Aleph::Patron::CirculationPolicy::Privileges

Inherits:
Object
  • Object
show all
Defined in:
lib/exlibris/aleph/patron/circulation_policy/privileges.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(privileges) ⇒ Privileges

Returns a new instance of Privileges.


10
11
12
13
14
15
16
17
18
19
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 10

def initialize(privileges)
  @borrow = privileges.borrow
  @photocopy = privileges.photocopy
  @request = privileges.request
  @request_multiple = privileges.request_multiple
  @request_on_shelf = privileges.request_on_shelf
  @renew = privileges.renew
  @book = privileges.book
  @rush_cataloging = privileges.rush_cataloging
end

Instance Attribute Details

#bookObject (readonly)

Returns the value of attribute book


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def book
  @book
end

#borrowObject (readonly)

Returns the value of attribute borrow


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def borrow
  @borrow
end

#photocopyObject (readonly)

Returns the value of attribute photocopy


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def photocopy
  @photocopy
end

#renewObject (readonly)

Returns the value of attribute renew


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def renew
  @renew
end

#requestObject (readonly)

Returns the value of attribute request


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def request
  @request
end

#request_multipleObject (readonly)

Returns the value of attribute request_multiple


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def request_multiple
  @request_multiple
end

#request_on_shelfObject (readonly)

Returns the value of attribute request_on_shelf


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def request_on_shelf
  @request_on_shelf
end

#rush_catalogingObject (readonly)

Returns the value of attribute rush_cataloging


7
8
9
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 7

def rush_cataloging
  @rush_cataloging
end

Instance Method Details

#can_book?Boolean

Returns:

  • (Boolean)

45
46
47
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 45

def can_book?
  book == 'Y'
end

#can_borrow?Boolean

Returns:

  • (Boolean)

21
22
23
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 21

def can_borrow?
  borrow == 'Y'
end

#can_photocopy?Boolean

Returns:

  • (Boolean)

25
26
27
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 25

def can_photocopy?
  photocopy == 'Y'
end

#can_renew?Boolean

Returns:

  • (Boolean)

41
42
43
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 41

def can_renew?
  renew == 'Y'
end

#can_request?Boolean

Returns:

  • (Boolean)

29
30
31
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 29

def can_request?
  request == 'Y'
end

#can_request_multiple?Boolean

Returns:

  • (Boolean)

33
34
35
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 33

def can_request_multiple?
  request_multiple == 'Y'
end

#can_request_on_shelf?Boolean

Returns:

  • (Boolean)

37
38
39
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 37

def can_request_on_shelf?
  request_on_shelf == 'Y'
end

#can_rush_cataloging?Boolean

Returns:

  • (Boolean)

49
50
51
# File 'lib/exlibris/aleph/patron/circulation_policy/privileges.rb', line 49

def can_rush_cataloging?
  rush_cataloging == 'Y'
end