Module: UtilSkripsi
- Defined in:
- lib/skripsi-util.rb
Defined Under Namespace
Classes: DaftarPustaka
Instance Method Summary collapse
- #Cover_Penelitian(obj, jenis, judul, gjalur, nama, nim, prodi, kampus, kota, tahun) ⇒ Object
- #Daftar_Pustaka(obj, deret) ⇒ Object
- #Judul_Bab(obj, bab, penomoran = true) ⇒ Object
- #Paragraff(obj, teks) ⇒ Object
- #Subjudul(obj, teks) ⇒ Object
- #Text(nama) ⇒ Object
Instance Method Details
#Cover_Penelitian(obj, jenis, judul, gjalur, nama, nim, prodi, kampus, kota, tahun) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/skripsi-util.rb', line 22 def Cover_Penelitian(obj, jenis, judul, gjalur, nama, nim, prodi, kampus, kota, tahun) obj.kosong obj.kosong obj.judul jenis.upcase obj. obj.judul(judul.upcase).tap do |teks| teks.ubah_ukuran(18) end obj. obj. obj. obj. gjalur obj.paragraf(nama).tap do |teks| teks.ubah_ukuran(18) teks.bold = true teks.align = :center teks.masuk = false teks.underline = true teks.kecilkan_spacing end obj.paragraf(nim).tap do |teks| teks.ubah_ukuran(18) teks.bold = true teks.align = :center teks.masuk = false end obj. obj. obj. obj. obj. obj. obj. obj. obj.judul(prodi) obj.judul(kampus) obj.judul(kota) obj.judul(tahun) end |
#Daftar_Pustaka(obj, deret) ⇒ Object
88 89 90 91 92 93 94 95 96 |
# File 'lib/skripsi-util.rb', line 88 def Daftar_Pustaka(obj, deret) Judul_Bab(self, 'daftar pustaka', false) deret.each do |i| pg = obj.paragraf(i.text) pg.mode = :pustaka pg.ubah_ukuran(14) pg.masuk = false end end |
#Judul_Bab(obj, bab, penomoran = true) ⇒ Object
62 63 64 65 66 67 68 69 70 |
# File 'lib/skripsi-util.rb', line 62 def Judul_Bab(obj, bab, penomoran=true) pgbreak @nomor_bab = 0 if @nomor_bab.nil? @nomor_bab += 1 if penomoran obj.kosong obj.bab('BAB ' + RomanNumerals.to_roman(@nomor_bab)) if penomoran obj.bab(bab.upcase) obj. end |
#Paragraff(obj, teks) ⇒ Object
82 83 84 85 86 |
# File 'lib/skripsi-util.rb', line 82 def Paragraff(obj, teks) obj.paragraf(teks).tap do |t| t.ubah_ukuran(14) end end |
#Subjudul(obj, teks) ⇒ Object
72 73 74 75 76 77 78 79 80 |
# File 'lib/skripsi-util.rb', line 72 def Subjudul(obj, teks) @nomor_subjudul = 0 if @nomor_subjudul.nil? @nomor_subjudul += 1 nama = @nomor_subjudul.to_s.concat('. ').concat(teks) obj.judul(nama).tap do |j| j.ubah_ukuran(16) j.align = :left end end |
#Text(nama) ⇒ Object
18 19 20 |
# File 'lib/skripsi-util.rb', line 18 def Text(nama) File.read("#{nama}.txt") end |