Class: Label

Inherits:
ApplicationRecord show all
Includes:
Housekeeping, Shared::Depictions, Shared::IsData, Shared::Notes, Shared::PolymorphicAnnotator, Shared::Tags
Defined in:
app/models/label.rb

Overview

Text to be printed.

Instance Attribute Summary (collapse)

Method Summary

Methods included from Housekeeping

#has_polymorphic_relationship?

Instance Attribute Details

- (Boolean?) is_copy_edited

Returns A curator assertion that the label has been checked and is ready for print. Not required prior to printing.

Returns:

  • (Boolean, nil)

    A curator assertion that the label has been checked and is ready for print. Not required prior to printing.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end

- (Boolean?) is_printed

Returns When true the label has been sent to the printed, as asserted by the curator.

Returns:

  • (Boolean, nil)

    When true the label has been sent to the printed, as asserted by the curator.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end

- (String) label_object_id

Returns Polymorphic id

Returns:

  • (String)

    Polymorphic id



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end

- (String) label_object_type

Returns Polymorphic type

Returns:

  • (String)

    Polymorphic type



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end

- (String) style

Returns The unique name for a corresponding CSS class. # TODO: reference vocabulary file

Returns:

  • (String)

    The unique name for a corresponding CSS class. # TODO: reference vocabulary file



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end

- (String) text

Returns The text of the label.

Returns:

  • (String)

    The text of the label.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end

- (Integer) total

Returns The number of copies to print

Returns:

  • (Integer)

    The number of copies to print



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'app/models/label.rb', line 31

class Label < ApplicationRecord

  include Housekeeping
  include Shared::Notes
  include Shared::Tags
  include Shared::Depictions
  include Shared::IsData

  include Shared::PolymorphicAnnotator
  polymorphic_annotates('label_object')

  ignore_whitespace_on(:text)

  validates_presence_of :text, :total

  scope :unprinted, -> { where(is_printed: false) }

end