Class: SistemKebut::Paragraph::Formulir

Inherits:
DefPengelolaXML show all
Includes:
InnerParagraph
Defined in:
lib/sks/paragraph/formulir.rb

Direct Known Subclasses

MejaSekat

Defined Under Namespace

Classes: UnitFormulir

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from InnerParagraph

#gandakan_spacing, #kecilkan_spacing, #struktur, #ubah_ukuran

Methods inherited from DefPengelolaXML

#pembangun

Methods inherited from KebutSemalam::PengelolaXML

#build, #pembangun

Constructor Details

#initialize(ts, ukuran) ⇒ Formulir

Returns a new instance of Formulir.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/sks/paragraph/formulir.rb', line 17

def initialize(ts, ukuran)
  @mode = :normal
  @fstyle = TNR
  @fsize = 22
  @masuk = false
  @bold = false
  @italic = false
  @underline = false
  @spacing = :normal
  @align = :both
  @konten = []
  @tabsize = ts
  ubah_ukuran(ukuran)
  kecilkan_spacing
end

Instance Attribute Details

#alignObject

Returns the value of attribute align.



14
15
16
# File 'lib/sks/paragraph/formulir.rb', line 14

def align
  @align
end

#boldObject

Returns the value of attribute bold.



15
16
17
# File 'lib/sks/paragraph/formulir.rb', line 15

def bold
  @bold
end

#fsizeObject

Returns the value of attribute fsize.



14
15
16
# File 'lib/sks/paragraph/formulir.rb', line 14

def fsize
  @fsize
end

#fstyleObject

Returns the value of attribute fstyle.



14
15
16
# File 'lib/sks/paragraph/formulir.rb', line 14

def fstyle
  @fstyle
end

#italicObject

Returns the value of attribute italic.



15
16
17
# File 'lib/sks/paragraph/formulir.rb', line 15

def italic
  @italic
end

#kontenObject

Returns the value of attribute konten.



14
15
16
# File 'lib/sks/paragraph/formulir.rb', line 14

def konten
  @konten
end

#masukObject

Returns the value of attribute masuk.



14
15
16
# File 'lib/sks/paragraph/formulir.rb', line 14

def masuk
  @masuk
end

#modeObject

Returns the value of attribute mode.



16
17
18
# File 'lib/sks/paragraph/formulir.rb', line 16

def mode
  @mode
end

#spacingObject

Returns the value of attribute spacing.



15
16
17
# File 'lib/sks/paragraph/formulir.rb', line 15

def spacing
  @spacing
end

#tabsizeObject

Returns the value of attribute tabsize.



16
17
18
# File 'lib/sks/paragraph/formulir.rb', line 16

def tabsize
  @tabsize
end

#underlineObject

Returns the value of attribute underline.



15
16
17
# File 'lib/sks/paragraph/formulir.rb', line 15

def underline
  @underline
end

Instance Method Details

#[](id) ⇒ Object



33
34
35
# File 'lib/sks/paragraph/formulir.rb', line 33

def [](id)
  @konten[id]
end

#tambah(l, v) ⇒ Object



41
42
43
44
# File 'lib/sks/paragraph/formulir.rb', line 41

def tambah(l, v)
  @konten.push(UnitFormulir.new(l, v))
  return nil
end

#tiap(&block) ⇒ Object



37
38
39
# File 'lib/sks/paragraph/formulir.rb', line 37

def tiap(&block)
  @konten.each(&block)
end