Class: HardCiter::IntextMatch
- Inherits:
-
Object
- Object
- HardCiter::IntextMatch
- Defined in:
- lib/hardciter/intext_match.rb
Instance Attribute Summary collapse
-
#citation ⇒ Object
Returns the value of attribute citation.
-
#next_in_group ⇒ Object
Returns the value of attribute next_in_group.
-
#position ⇒ Object
Returns the value of attribute position.
-
#regex_match ⇒ Object
Returns the value of attribute regex_match.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #cite_key ⇒ Object
-
#initialize(position = nil, regex_match = nil, type = nil) ⇒ IntextMatch
constructor
A new instance of IntextMatch.
Constructor Details
#initialize(position = nil, regex_match = nil, type = nil) ⇒ IntextMatch
Returns a new instance of IntextMatch.
8 9 10 11 12 |
# File 'lib/hardciter/intext_match.rb', line 8 def initialize(position=nil, regex_match=nil, type=nil) @position = position @regex_match = regex_match @type = type end |
Instance Attribute Details
#citation ⇒ Object
Returns the value of attribute citation.
6 7 8 |
# File 'lib/hardciter/intext_match.rb', line 6 def citation @citation end |
#next_in_group ⇒ Object
Returns the value of attribute next_in_group.
6 7 8 |
# File 'lib/hardciter/intext_match.rb', line 6 def next_in_group @next_in_group end |
#position ⇒ Object
Returns the value of attribute position.
6 7 8 |
# File 'lib/hardciter/intext_match.rb', line 6 def position @position end |
#regex_match ⇒ Object
Returns the value of attribute regex_match.
6 7 8 |
# File 'lib/hardciter/intext_match.rb', line 6 def regex_match @regex_match end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/hardciter/intext_match.rb', line 6 def type @type end |
Instance Method Details
#cite_key ⇒ Object
14 15 16 17 |
# File 'lib/hardciter/intext_match.rb', line 14 def cite_key match_data = HardCiter.configuration.cite_key_pattern.match(@regex_match) match_data[0] if match_data.is_a? MatchData end |