You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
ã³ãã³ãã¯ã以ä¸ã®ãããªæ¸å¼ã§ãªãã·ã§ã³ã¨å¼æ°ãè¨å®ãã¦ãå®è¡ããä»çµã¿ã«ãªã£ã¦ããã ä¾ï¼ ã³ãã³ãå ãªãã·ã§ã³ ãªãã·ã§ã³ ãªãã·ã§ã³å¼æ° ãªãã·ã§ã³ ã³ãã³ãå¼æ° optparser_test.rb -a -b VALUE --foo FILE_PATH å®éã«ã³ãã³ããä½ããã¨ããã¨ããªãã·ã§ã³ã®è§£æã«ã¯æéããããã¨æ°ä»ãã ãã®ãããå¤ãã®è¨èªç°å¢ã«ã¯ãªãã·ã§ã³è§£æç¨ã®ã©ã¤ãã©ãªãç¨æããã¦ããã Rubyã®optparserã«ã¤ãã¦ãåºæ¬çãªä½¿ãæ¹ã¯ç¥ã£ã¦ããã¤ããã ã£ãã... Rubyã§ã³ãã³ãã®ä¸èº«ãä½ãã¾ã§ - ã¶ãªã¬ããè¦ã¦ãã...ã ã¡ãã£ã¨æ°ã®å©ããã³ãã³ãã«ãããã¨ããã¨ããã®ä½¿ãæ¹ã¯è¬ã ããã«ãªã£ãã ã©ããããè¦å´æå°éã§ãªãã·ã§ã³ã解æã§ããã®ãã調ã¹ã¦ã¿ãã åºæ¬ require 'optparse' OptionParser.new do |op
What Is YARD? YARD is a documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions. Above is a highlight of the some of YARD's notable features. And of course YARD comes with muc
ããã«ã¡ã¯ãé´æ¨ã§ãã Ruby on Rails ã§è¤æ°ã®ãã¼ã¿ãã¼ã¹ãæ±ãæ¹æ³ããç´¹ä»ãã¾ãã establish_connection establish_connection ã¯ãã¼ã¿ãã¼ã¹ã¨æ¥ç¶ããããã®ã¡ã½ããã§ãã é常ã¯æ示çã«å¼ã³åºããã¨ã¯ããã¾ããããè¤æ°ã®ãã¼ã¿ãã¼ã¹ã使ç¨ããå ´åã¯ã以ä¸ã®ããã«æ示çã«å¼ã³åºãå¿ è¦ãããã¾ãã class User < ActiveRecord::Base establish_connection :adapter => 'postgresql', :encoding => 'unicode', :database => 'other_database', :pool => '5', :username => 'USERNAME', :password => 'PASSWORD', :host => 'localhost' end
ãªãã iMac ä¸ã® RVM ã®åä½ãå¤ããããéãç´ã£ã¦ã¯ãªã¼ã³ã¤ã³ã¹ãã¼ã«ãããã¨ã«ããã RVM ã®ã¢ã³ã¤ã³ã¹ãã¼ã«ã³ãã³ããæ¢ãã¦ã¿ãã "implode" ã¨ä¸ç·ã« "seppukuï¼åè ¹ï¼"ããã£ãã®ã«ã¯ç¬ã£ãã 3509: implode | seppuku) 3536- source "$rvm_scripts_path/functions/implode"; 3594- __rvm_implode ãã£ããåè ¹ã:-) $ rvm seppuku Are you SURE you wish for rvm to implode? This will recursively remove /Users/watanata/.rvm and other rvm traces? (anything other than 'yes' will cancel) > yes Remo
ruby-talk ã® 381425 㧠ãã©ã®ã¡ã½ãããå¼ã³åºããã¦ããã®ã調ã¹ãæ¹æ³ãç¥ãããã ã¨ããå 容ã®è³ªåãããã¾ããã ç§ãç¥ããªãã£ãã®ã§ãããMethod ãªãã¸ã§ã¯ãã使ãã°ç°¡åã«ç¥ããã¨ãã§ããããã§ãã ã¨ããããã§ãã¡ã½ãããã©ãã§å®ç¾©ããã¦ããã®ãã調ã¹ãæ¹æ³ãæ¸ãã¦ããã¾ãã ã¡ã½ãããå®ç¾©ãã¦ããã¯ã©ã¹ã¾ãã¯ã¢ã¸ã¥ã¼ã«ã¸ã®åç §ãåå¾ãã ããã¡ã½ãããã©ã®ã¯ã©ã¹ (ã¾ãã¯ã¢ã¸ã¥ã¼ã«) ã§å®ç¾©ããã¦ããããç¥ããããã°ããã®ã¡ã½ããã«å¯¾å¿ãã Method ãªãã¸ã§ã¯ããåå¾ããMethod#owner ã¡ã½ãã ãå¼ã³åºãã¾ãã ããã ãã§ãã¡ã½ãããå®ç¾©ãã¦ããã¯ã©ã¹ (ã¾ãã¯ã¢ã¸ã¥ã¼ã«) ã¸ã®åç §ãåå¾ã§ãã¾ãã ã¡ãªã¿ã«ãããååã®ã¡ã½ããã«å¯¾å¿ãã Method ãªãã¸ã§ã¯ããåå¾ããã«ã¯ãKernel#method ã¡ã½ãã ã使ç¨ãã¾ãã 'ãã
#! ruby -Ks # shortcut.rb # ã·ã§ã¼ãã«ãããä½æãã¾ãã # # åæ # - win32-shortcutãå¿ è¦ã§ãã # > gem install win32-shortcut require 'rubygems' require 'win32/shortcut' include Win32 shortcut = Shortcut.new "shortcut_test.lnk" shortcut.description = "Shortcut Test" shortcut.path = "C:\\Windows\\notepad.exe" shortcut.show_cmd = Shortcut::SHOWNORMAL shortcut.working_directory = "." shortcut.save
ubuntu 12.04ã sudo apt-get install ruby-rvm ã£ã¦ããã¨ãã«ã以ä¸ã®ãããªã¨ã©ã¼ã«ã ï¼LANG=Cã§å®è¡ããã¨ãã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ãåã£ã¨ãã¹ãã ã£ãã»ã»ã»ï¼ ruby-rvm (1.6.9-0ubuntu2) ãè¨å®ãã¦ãã¾ã ... dpkg-statoverride: error: ææ³ã¨ã©ã¼: statoverride ãã¡ã¤ã«ã«æªç¥ã®ã°ã«ã¼ã 'admin' ãããã¾ã dpkg: ruby-rvm ã®å¦çä¸ã«ã¨ã©ã¼ãçºçãã¾ãã (--configure): ãµãããã»ã¹ ã¤ã³ã¹ãã¼ã«æ¸ã¿ã® post-installation ã¹ã¯ãªãã ã¯ã¨ã©ã¼çµäºã¹ãã¼ ã¿ã¹ 2 ãè¿ãã¾ãã 以ä¸ã®ããã±ã¼ã¸ã®å¦çä¸ã«ã¨ã©ã¼ãçºçãã¾ãã: ruby-rvm E: Sub-process /usr/bin/dpkg returned an
ãã¯ã説æã¯ä¸è¦ããããã¾ãããã"puppet"ã¯ãPuppet Labsãéçºãã¦ããã·ã¹ãã éç¨ç®¡çãã¼ã«ã§ãpuppet管çä¸ã«ãããµã¼ã群ã®ã·ã¹ãã ã®ç¶æ ã"ããã¹ãç¶æ "ã«ä¿ã¤ããã®è£å©ãã¼ã«ã§ãã chefãpuppetã¨åçã®æ©è½ãæã¡ãã·ã¹ãã ã®éç¨ç®¡çãããã«ã¯å¤§å¤ä¾¿å©ã§ã¯ããã¾ããã管çãããµã¼ãå°æ°ãå¢å ãã¦ããã¨ãchef/puppetã ãã§ã¯è§£æ±ºãã¥ãããã¨ãçºçãå§ãã¾ãã ä¾ãã°ãæ°ç¾å°ã®ãµã¼ãã®éç¨ç®¡çããã¦ãããããã®ä¸ã®ä¸é¨ã ããµã¼ãã®ç¶æ ãä¸å®å®ã«ãªããdaemonãåæ¢ãã¦ãã¾ã£ãããäºæãã¬ã¬ã¹ãã³ã¹ãè¿ãã¦ãã¾ã£ããããäºæ ã«ééãããã¨ãç¨ã«ããã¾ãã ä»ã«ããç¹å®ã®ãã±ã¼ã«ã«é ç½®ãã¦ãããµã¼ãã§ã®ã¿ãä½ãããã®å¦çã1度ã ãå®è¡ããªããã°ãªããªãã¨äºæ ãçºçããã¡ã§ãã ãã®ãããªå ´åã¯ãpuppetãå©ç¨ãã¦ç¶æ³ç¢ºèªãå¦çã®å®è¡ããããã¨
I was watching The Last Dance, Michael Jordanâs Netflix documentary, last year when I returned to work from four-month-long paternity leave. It was a great show and brought back all of the joys I had when watching Chicago Bulls in the 90s. And it still got me to think till today, what if my engineering team were a sports team. Give this idea a shot. For an engineer in an IT company, you donât play
ã¯ããã« Rails Wayãèªã¿ãªããRailsã®ã«ã¼ãã£ã³ã°ã«ã¤ãã¦å¦ç¿ããäºãã¾ã¨ãã¦ããã ã«ã¼ãã£ã³ã°ã¨ã¯ Railsã®ã«ã¼ãã£ã³ã°ã¯åä¿¡ããURLããå®è¡ãã¹ãã¢ã¯ã·ã§ã³ãå¤æããã·ã¹ãã ãã«ã¼ãã£ã³ã°ã®ã«ã¼ã«ã¯config/routes.rbã«å®ç¾©ããã ããã©ã«ãã®ã«ã¼ãã£ã³ã° ããã©ã«ãã®ã«ã¼ãã£ã³ã°ã®åä½ã¯ã以ä¸ã®ããã«å®ç¾©ãã㨠<%= link_to "Items", :controller => "item", :action => "list" %> ãã®URLãå¾ãããã http://localhost:3000/item/listã§ã¯route.rbã®å®ç¾©ãè¦ã¦ã¿ãããã£ãããã ãã ActionController::Routing::Routes.draw do |map| map.connect ':controller/:action/:id' m
ååæ¸ãã ããããªãPuppetãããã«ã¡ã¯Chef ãããããªãã«åé¿ãã£ãã®ã§èª¿åã«ä¹ã£ã¦ããã¡ãã£ã¨æ¸ãã¦ã¿ãã ååãChefã¯Puppetã«æ¯ã¹ã¦ç°¡åï¼ã¨ãæ¸ããããå®éã«ã¯æ £ããã¾ã§ãããªãã«æ¸æãã¨ããããã£ãã ããã¥ã¡ã³ã ãèªã¿ãå®éã«è§¦ã£ãã ãã§ã¯ä¸çºã§ç解ã§ããªãã£ãé¨åããèªåã®ã¡ã¢ãå ã«æãã¦ãããããã ãèªãã§ããã¾ãã¡ã ã¨æãã®ã§ãé¢é£ããããã¥ã¡ã³ãã¸ã®ãªã³ã¯ãå¼µã£ã¦ããã®ã§åããã¦èªãã§ã¿ãã¨é«éã§Chefãç解ã§ããããï¼ client vs node Chef Client Nodes ããã¥ã¡ã³ããèªãã ãChefã触ã£ã¦ãã㨠client 㨠node ã¨ããäºã¤ã®ã¯ã¼ããåºã¦ããããã®äºã¤ã¯ä¼¼ã¦ãããã©å¥ç©ã client ã¯æåéã Chef server ã®ç¸æã«ãªããã®ã Chef server ã«ã¢ã¯ã»ã¹ãããã®ã¯ãã¹ã¦ clien
ããrequire()ãã¦ã³ã¼ããæ¸ãã¦ããã¨ãä»ããé層ã«ã¯ã©ããªã¯ã©ã¹ãåå¨ããã®ã ä¸è¦§ãè¦ã¦ã¿ãããªãã¾ãããï¼ å®ã¯ãid:akio0911ã«ãRubyã§ã¯ã©ã¹ä¸è¦§ã表示ããæ¹æ³ç¥ããªãï¼ãã¨èãããã®ã§ 調ã¹ã¦ã¿ã¾ããã çã self.class.constants.reject{|constant| eval("!#{constant}.kind_of?(Class)")} ã»ã»ã»ãã¼ã¨ãã¯ããããããããªãã¨æãã®ã§ããå°ãããããããæ¸ãã¾ãã self.class #=> Object ããããªãã¸ã§ã¯ãã®ã¯ã©ã¹ãè¿ãã¦ãããã¾ãã self.class.constants #=> ["TrueClass", "CROSS_COMPILING", ... ] ããããªãã¸ã§ã¯ããæã¤ã³ã³ã¹ã¿ã³ã¹ãé åã¨ãã¦è¿ãã¦ãããã¾ãã ãã®é åã®ä¸ã«ã¯ãããããªãã¸ã§ã¯ããææ
63. ããã¯ã©ã¹ã®ãµãã¯ã©ã¹ãå å¾ãã class Object def subclasses_of(*superclasses) subclasses = [] superclasses.each do |sup| ObjectSpace.each_object(class << sup; self; end) do |k| if k != sup && (k.name.blank? || eval(quot;defined?(::#{k}) && ::#{k}.object_id == k.object_idquot;)) subclasses << k end end end subclasses end end 62/67
ããã³ã¾ãã¯ãRuby ã«é¢ããæè¡è¨äºã¯ãã¡ããã®ãã¨ãRubyist ã¸ã®ã¤ã³ã¿ãã¥ã¼ãã¨ãã»ã¤ããã®ä»ããå±ãããã¦ã§ãéèªã§ãã Rubyist Magazine ã«ã¤ã㦠ãRubyist Magazineããç¥ãã¦ããã³ã¾ãã¯ãæ¥æ¬ Ruby ã®ä¼ã®æå¿ã«ãã Rubyist ã® Rubyist ã«ãããRubyist ã¨ããã§ãªã人ã®ããã®ã¦ã§ãéèªã§ãã ææ°å· Rubyist Magazine 0058 å· ããã¯ãã³ãã¼ Rubyist Magazine 0058 å· RubyKaigi 2018 ç´åç¹éå· Rubyist Magazine 0057 å· RubyKaigi 2017 ç´åç¹éå· Rubyist Magazine 0056 å· Rubyist Magazine 0055 å· Rubyist Magazine 0054 å· æ±äº¬ Ruby ä¼è° 11 ç´
IronRubyã¯Î±æ代ããå¼ã£ã¦ãã¾ãããããã¼ã¸ã§ã³ãä¸ãããã³ã«ãã¹ãã£ã³ã°æ¹æ³ãå¤æ´ããã¦ãã¾ãããRCã«ãªã£ãã®ã§ããããæçµçã ã¨æãããã®ã§ãããã©ã¼ãªãã§ããã(^^; ã¦ãã¨ã¼ãªrubyã®ã¯ã©ã¹ã class Foo def bar puts 'baz' end def add(x, y) x + y end def sub(x, y) x - y end end ãããC#ããå¼ã³åºãã¦ã¿ã¾ãã using System; using System.Collections.Generic; using System.Linq; using System.Text; using IronRuby.Hosting; namespace IronRubySample { class Program { static void Main(string[] args) { //
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}