Ruby의 Send 메소드

쉽게 말해서 코드상에서 코드를 호출하는 메소드이다.
#{attribute}에 메소드명을, value에는 인자를 넣어준다.

형식 : obj.send(#{attribute}, value)

예제)
>> t = Time.now
=> Wed Feb 03 22:50:09 +0900 2010
>> t.strftime('%y')
=> "10"
>> t.send(:strftime, '%y')
=> "10"


요즘 웹게임을 만들고 있는데, 플레이어의 명령(이동, 공격 등...)을 유연하게 구현하기위해서 send 함수를 찾아보게 되었다.

Posted by 밤치

2010/02/03 22:57 2010/02/03 22:57
, , , , , ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/138

VisualStudio2005SyntaxHighlightConfig

목차

1 개요
2 Download
3 Ruby SyntaxHighlight Example
4 ScreenShot

1 개요

어느 루비발표 자료의 SyntaxHighlight가 마음에 들어서 TheDarkSide2005를 수정해서 만들어 보았다.
Class, Struct, TypeDef, Method, Variable, Preprocessor macro는 VisualAssistX의 기능이라서 따로 설치해야만 SyntaxHighlighting이 가능하다.

2 Download

TheDarkSide2005_modified_bamchi.zip
"도구 - 설정 가져오기 및 내보내기" 기능으로 가져오기만 하면 된다.

3 Ruby SyntaxHighlight Example

RubySyntaxHighlightExample.png

4 ScreenShot

DarkSideModifiedBamchi.png

VisualAssistX.png

참고 : [http]Join The Dark Side Of Visual Studio(http://weblogs.asp.net/infinitiesloop/archive/2006/08/06/Join-the-Dark-Side-of-Visual-Studio.aspx)

Retrieved from http://bamchi.com/wiki/wiki.php/VisualStudio2005SyntaxHighlightConfig
last modified 2008-06-23 12:29:10

Posted by 밤치

2008/06/23 15:18 2008/06/23 15:18
, , , ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/19

Ruby(루비) 언어 맛보기

Ruby라는 언어는 사실 상당히 오래된 언어임에도 최근에서야 Rails에 힘입어 많은 인기를 끌고 있습니다.

앞으로 Rails에 관련된 포스팅을 많이 할 예정입니다.

Ruby로 만들어진 Rails를 공부하기 위해 Ruby란 어떤 언어인지 맛볼 수 있는 사이트를 소개해드리겠습니다.

15분만 투자해보세요. 재미있는 Ruby의 세계로 빠져듭니다.

http://tryruby.hobix.com/

사용자 삽입 이미지

Posted by 밤치

2008/03/14 00:34 2008/03/14 00:34
,
Response
A trackback , 2 Comments
RSS :
http://bamchi.com/blog/rss/response/7