Module: Sherlock::LaTex::Collection::Files::InstanceMethods

Defined in:
lib/sherlock/latex.rb

Instance Method Summary collapse

Instance Method Details

#collect_macros(pattern) ⇒ Object Also known as: macros



32
33
34
# File 'lib/sherlock/latex.rb', line 32

def collect_macros(pattern)
  collect(/\\(#{pattern})(\{([^\}]+)\})*/)
end

#inputs(opts = {}) ⇒ Object



37
38
39
# File 'lib/sherlock/latex.rb', line 37

def inputs(opts = {})
  macros(:input).filter(opts)
end

#not_tagged(with_tag) ⇒ Object



47
48
49
50
51
# File 'lib/sherlock/latex.rb', line 47

def not_tagged(with_tag)
  tag_prefix = "%%!!"
  arr = [with_tag].flatten.map { |tag| "#{tag_prefix} #{tag}" }
  not_containing(arr)
end

#tagged(with_tag) ⇒ Object



41
42
43
44
45
# File 'lib/sherlock/latex.rb', line 41

def tagged(with_tag)
  tag_prefix = "%%!!"
  arr = [with_tag].flatten.map { |tag| "#{tag_prefix} #{tag}" }
  containing(arr)
end