Class: Baseband

Inherits:
Object
  • Object
show all
Defined in:
lib/daslabs/baseband.rb

Class Method Summary collapse

Class Method Details

.bootstrapandroid(n = "Baseband") ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/daslabs/baseband.rb', line 30

def self.bootstrapandroid(n = "Baseband")
  puts "Writing output.xml to : #{Dir.pwd}"
  doc = Nokogiri::HTML "  <?xml version=\"1.0\" encoding=\"utf-8\"?>\n   <body>\n      <item>\n        <time>05.04.2011 9:53:23</time>\n        <iddqd>42</iddqd>\n        <idkfa>woot</idkfa>\n      </item>\n    </body>\n    </xml>\n    EOHTML\n\n    hammer = doc.at_css \"time\"\n    hammer.name = n\n    doc.css(\"iddqd\").remove\n    doc.css(\"idkfa\").remove\n\n    outfile = File.new(\"output.xml\", \"w\")\n    outfile.puts doc.to_html\n    outfile.close\nend\n"

.bootstrapios(n = "Baseband") ⇒ Object



54
55
56
# File 'lib/daslabs/baseband.rb', line 54

def self.bootstrapios(n = "Baseband")
  puts "Writing ios project to : ", n
end

.bootstrapweb(n = "Baseband") ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/daslabs/baseband.rb', line 6

def self.bootstrapweb(n = "Baseband")
  puts "Writing output.html to : #{Dir.pwd}"
  doc = Nokogiri::HTML "   <html>\n   <body>\n      <item>\n        <time>05.04.2011 9:53:23</time>\n        <iddqd>42</iddqd>\n        <idkfa>woot</idkfa>\n      </item>\n    </body>\n    </html>\n    EOHTML\n\n    hammer = doc.at_css \"time\"\n    hammer.name = n\n    doc.css(\"iddqd\").remove\n    doc.css(\"idkfa\").remove\n\n    outfile = File.new(\"output.html\", \"w\")\n    outfile.puts doc.to_html\n    outfile.close\nend\n"