Class: SistemKebut::XML::Pengepul
- Inherits:
-
Object
- Object
- SistemKebut::XML::Pengepul
- Defined in:
- lib/xml/administrasi.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ Pengepul
constructor
A new instance of Pengepul.
- #serialize ⇒ Object
- #xml? ⇒ Boolean
Constructor Details
#initialize(xml) ⇒ Pengepul
Returns a new instance of Pengepul.
20 21 22 |
# File 'lib/xml/administrasi.rb', line 20 def initialize(xml) @sasaran = xml end |
Instance Method Details
#serialize ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/xml/administrasi.rb', line 28 def serialize pembangun = method(:prosedur_kosong) if @sasaran.is_a?(File) pembangun = method(:prosedur_file) else pembangun = method(:prosedur_xml) end pembangun.call(@sasaran) end |
#xml? ⇒ Boolean
24 25 26 |
# File 'lib/xml/administrasi.rb', line 24 def xml? return !@sasaran.is_a?(File) end |