Class: MLA
Instance Attribute Summary
Attributes inherited from RuleBase
Class Method Summary collapse
Class Method Details
.fetch(string, base) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/citation/rules/mla.rb', line 12 def self.fetch(string, base) title = @matcher[0] string.slice!('()') s = string.split(title) string.slice!(title) title.gsub!('"','') = s.shift desc = s.shift type = 'MLA'.to_sym string.slice!() unless string.empty? string.slice!(desc) unless string.empty? return string, title, , desc, type end |
.satisfy?(string, base) ⇒ Boolean
7 8 9 10 |
# File 'lib/citation/rules/mla.rb', line 7 def self.satisfy?(string, base) @matcher = string.match(/".+"/) !@matcher.nil? end |