Module: Sherlock::LaTex::Collection::Files::InstanceMethods
- Defined in:
- lib/latex.rb
Instance Method Summary collapse
- #collect_macros(pattern) ⇒ Object (also: #macros)
- #inputs(opts = {}) ⇒ Object
- #not_tagged(with_tag) ⇒ Object
- #tagged(with_tag) ⇒ Object
Instance Method Details
#collect_macros(pattern) ⇒ Object Also known as: macros
21 22 23 |
# File 'lib/latex.rb', line 21 def collect_macros(pattern) collect(/\\(#{pattern})(\{([^\}]+)\})*/) end |
#inputs(opts = {}) ⇒ Object
26 27 28 |
# File 'lib/latex.rb', line 26 def inputs(opts = {}) macros(:input).filter(opts) end |
#not_tagged(with_tag) ⇒ Object
36 37 38 39 40 |
# File 'lib/latex.rb', line 36 def not_tagged(with_tag) tag_prefix = "%%!!" arr = [with_tag].flatten.map { |tag| "#{tag_prefix} #{tag}" } not_containing(arr) end |
#tagged(with_tag) ⇒ Object
30 31 32 33 34 |
# File 'lib/latex.rb', line 30 def tagged(with_tag) tag_prefix = "%%!!" arr = [with_tag].flatten.map { |tag| "#{tag_prefix} #{tag}" } containing(arr) end |