IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
ãããããã®æ å ±ã³ãã¥ãã±ã¼ã·ã§ã³ã¯RSSã ãã¨ãããã¨ã§RSSãä½æãã¦ã¿ã¾ããã ãã¾ãããªããã¨ãã声ãèããã¦ãããã§ããã»ã»ã»(ç¬) ããããããã«ããããããªé¢ã§å©ç¨ãããããã«ãªã£ã¦ããã¨æãã¾ãã RSSã®çæã«ã¯ãRubyããå©ç¨ãã¾ãã ä»åã®è¨äºã®å 容ã¯ã以ä¸ã®ã¨ããã§ãã (A)ãRubyãã§RSSãçæãã (B)çæããRSSã«ã¹ã¿ã¤ã«ã·ã¼ããé©ç¨ãã¦è¡¨ç¤ºãã ããã§ã¯ãæ©éãåãæããã¾ãããã (A)ãRubyãã§RSSãçæãã ã³ã¼ã(ãtest.rbã)ã示ãã¾ãã -------------------------- ãããã(test.rb) # ãrss/makerãã©ã¤ãã©ãªãå©ç¨ãã¾ã require 'rss/maker' # RSSã®ãã¼ã¸ã§ã³ãæå®ãã¦RSSãªãã¸ã§ã¯ããçæãã¾ã rss = RSS::Maker.make("1.0"
require "cgi" require "template" class Feeder def self.get(tmpl_path, options = {}) cgi = CGI.new mime_type = options[:mime_type] || "application/xml" encoding = options[:encoding] || "utf-8" language = options[:language] || "ja" v = Template.get(tmpl_path, {"type" => mime_type, "charset" => encoding}) v.encoding = encoding v.language = language v.site_url = "http://" + cgi.server_name v.feed_url
require 'rubygems' require_gem 'builder' xmlobj= Builder::XmlMarkup.new(:target=>STDOUT, :indent=>2) xmlobj.person { |b| b.name("Jim"); b.phone("555-1234") } # # Prints: # <person> # <name>Jim</name> # <phone>555-1234</phone> # </person> require 'rubygems' require_gem 'builder', '~> 2.0' xml = Builder::XmlMarkup.new xmlobj = xml.person { |b| b.name("Jim"); b.phone("555-1234") } xmlobj #=> <person>
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}