Sha256: 52973dc7e69efc48ae18dfafdc61084de46bbb1657b2535c7211cad9d7af701b

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

require 'rubygems'
require 'nokogiri'


class Baseband
  def self.bootstrapweb(n = "Baseband")
    puts "Writing output.html to : #{Dir.pwd}"
    doc = Nokogiri::HTML <<-EOHTML
     <html>
     <body>
        <item>
          <time>05.04.2011 9:53:23</time>
          <iddqd>42</iddqd>
          <idkfa>woot</idkfa>
        </item>
      </body>
      </html>
      EOHTML

      hammer = doc.at_css "time"
      hammer.name = n
      doc.css("iddqd").remove
      doc.css("idkfa").remove

      outfile = File.new("output.html", "w")
      outfile.puts doc.to_html
      outfile.close
  end

  def self.bootstrapandroid(n = "Baseband")
    puts "Writing output.xml to : #{Dir.pwd}"
    doc = Nokogiri::HTML <<-EOHTML
    <?xml version="1.0" encoding="utf-8"?>
     <body>
        <item>
          <time>05.04.2011 9:53:23</time>
          <iddqd>42</iddqd>
          <idkfa>woot</idkfa>
        </item>
      </body>
      </xml>
      EOHTML

      hammer = doc.at_css "time"
      hammer.name = n
      doc.css("iddqd").remove
      doc.css("idkfa").remove

      outfile = File.new("output.xml", "w")
      outfile.puts doc.to_html
      outfile.close
  end

  def self.bootstrapios(n = "Baseband")
    puts "Writing ios project to : #{Dir.pwd}"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
daslabs-0.9.0 lib/daslabs/baseband.rb