Class: Format::BMC

Inherits:
Object
  • Object
show all
Includes:
Format
Defined in:
lib/format/bmc.rb

Constant Summary

Constants included from Format

MediaForwarding, Symbol_to_class_string

Instance Method Summary collapse

Methods included from Format

#author_list, #finish, #format, #initialize, #method_missing, new, #par, #punctuate_initials

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Format

Instance Method Details

#articleObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/format/bmc.rb', line 6

def article
  issue_string =
    if issue.nil?
      ''
    else
      "(#{issue})"
    end
  vol_string = 
    if vol.nil?
      ''
    else
      vol
    end

  # This is the original:
  "#{author_list('')}: #{b(periodize(title))} #{i(journal_medline)} #{year}, #{b(vol_string)}#{issue_string}:#{pages_full}."
  #  ThIS IS NOT the BMC format:
  # "#{author_list('.', ' ', ', ', '&', true)} (#{year}) #{title.gsub(/\.$/,'')}, #{periodize(i(journal_iso))} #{i(vol_string)}, #{pages}."
end

#webpageObject

Webpage (2 examples): b(Webpage Name) [chemfinder.cambridgesoft.com]



29
30
31
# File 'lib/format/bmc.rb', line 29

def webpage
  [b(title), br(url)].compact.join(' ')
end