Class: Baseband
- Inherits:
-
Object
- Object
- Baseband
- Defined in:
- lib/dasauto/baseband.rb
Class Method Summary collapse
- .dasautoandroid(n = "Baseband") ⇒ Object
- .dasautoios(n = "Baseband") ⇒ Object
- .dasautoweb(n = "Baseband") ⇒ Object
Class Method Details
.dasautoandroid(n = "Baseband") ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/dasauto/baseband.rb', line 31 def self.dasautoandroid(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" |
.dasautoios(n = "Baseband") ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/dasauto/baseband.rb', line 55 def self.dasautoios(n = "Baseband") puts "Writing ios project to : ", n # FileUtils.cp_r "../generator-dasautoios/app/templates/DefaultProject.", 'dst', :verbose => true dirname = __dir__ puts "Current........" puts dirname destinationdir = File.join("../dst/", n) puts destinationdir FileUtils.mkdir_p destinationdir FileUtils.cp_r "../generator-dasautoios/app/templates/DefaultProject/.", destinationdir, :verbose => true end |
.dasautoweb(n = "Baseband") ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dasauto/baseband.rb', line 7 def self.dasautoweb(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" |