Class: Obp::Access::Renderer::Elements::BibRef
- Inherits:
-
Object
- Object
- Obp::Access::Renderer::Elements::BibRef
- Defined in:
- lib/obp/access/elements/bibliography/bib_ref.rb
Constant Summary collapse
- REF_PATTERN =
/\A\[(\d+)\]\s*/- DATED_PATTERN =
/:\d{4}/
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#std_id ⇒ Object
readonly
Returns the value of attribute std_id.
-
#std_ref_text ⇒ Object
readonly
Returns the value of attribute std_ref_text.
-
#title_text ⇒ Object
readonly
Returns the value of attribute title_text.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(td_node, anchor_node) ⇒ BibRef
constructor
A new instance of BibRef.
Constructor Details
#initialize(td_node, anchor_node) ⇒ BibRef
Returns a new instance of BibRef.
13 14 15 16 17 18 19 |
# File 'lib/obp/access/elements/bibliography/bib_ref.rb', line 13 def initialize(td_node, anchor_node) text = td_node.text @index = parse_index(text) @std_id = parse_std_id(anchor_node) @type = infer_type(text) @std_ref_text, @title_text = parse_parts(td_node) end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
11 12 13 |
# File 'lib/obp/access/elements/bibliography/bib_ref.rb', line 11 def index @index end |
#std_id ⇒ Object (readonly)
Returns the value of attribute std_id.
11 12 13 |
# File 'lib/obp/access/elements/bibliography/bib_ref.rb', line 11 def std_id @std_id end |
#std_ref_text ⇒ Object (readonly)
Returns the value of attribute std_ref_text.
11 12 13 |
# File 'lib/obp/access/elements/bibliography/bib_ref.rb', line 11 def std_ref_text @std_ref_text end |
#title_text ⇒ Object (readonly)
Returns the value of attribute title_text.
11 12 13 |
# File 'lib/obp/access/elements/bibliography/bib_ref.rb', line 11 def title_text @title_text end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/obp/access/elements/bibliography/bib_ref.rb', line 11 def type @type end |