๋ณธ์ธ ์๊ฐ
์...
์๋ ์ ๊น์์ ๋ฐ๋ก -> ๋น๋๊ธฐ์ ๊ดํ ์ค๋ช -> ๊ทธ๋ฆผ -> ์ ๋ญ ์ด๋ฐ ์ ๊ฐ์ธ๊ฑด ์๊ฒ ๋๋ฐ..
๋ฌธ์ ๊ฐ ๋๋ ์ํฉ๋ ์๋ชจ๋ฅด๊ฒ ๊ณ ๋ญํด๊ฒฐํ๊ฑด์ง๋ ์๋ชจ๋ฅด๊ฒ ๊ณ ๊ทธ๋ ๋ค๋ฅ.
| var elements = $("searchForm").elements, | |
| count = 28; | |
| for(var i = 0; i < elements.length; i++){ | |
| var element = elements[i]; | |
| if(element.name.match(/[๊ฐ-ํฃ]/) && (element.alt === "" || element.value === "")) { | |
| count--; | |
| if(count < 2) { | |
| gfn_alertMsg("์กฐํ๊ฑด์์ธ ๋๊ฐ ์ด์ ์ ๋ ฅํ์๊ธฐ ๋ฐ๋๋๋ค.", "W"); | |
| return; | |
| } |
| module Yahoo | |
| self.included(base) | |
| base.messages << :yahoo | |
| end | |
| end |
| require 'spec_helper' | |
| class Test | |
| def self.messages | |
| @messages ||= [] | |
| end | |
| end | |
| describe Yahoo do | |
| let(:yahoo_included_test_object) do | |
| Test.send(:include, Yahoo) |
| module Yahoo | |
| def say | |
| "An" | |
| end | |
| end | |
| class Base | |
| include Yahoo | |
| def say |
| def count_coins(a,c1,c5,c10,c50,c100,c500) | |
| coins, sum = Hash.new {|hash,key| hash[key] = eval("c#{key}") }, 0 | |
| [500,100,50,10,5,1].each {|c| coins[c] } | |
| left_amont = coins.inject(a) do |amount,(coin,count)| | |
| count=[count,amount/coin].min | |
| sum += count | |
| amount -= coin*count | |
| end | |
| if left_amont != 0 | |
| raise "์ง๋ถ๋ฐฉ๋ฒ์ด ์๋๋ฐ์?" |
| class Person | |
| end | |
| module Yahooable | |
| def yahoo | |
| "Yahoo!" | |
| end | |
| end | |
| person = Person.new |
| def some_method | |
| return false if aaaaaaaaaaaa && bbbbbbbbbbbb | |
| return false if cccccccccccc || dddddddddddd | |
| return false if eeeeeeeeeeee && ffffffffffff | |
| do_something | |
| end |
| def some_method | |
| return false if aaaaaaaaaaaa && bbbbbbbbbbbb | |
| return false if cccccccccccc || dddddddddddd | |
| return false if eeeeeeeeeeee && ffffffffffff | |
| do_something | |
| end |