-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cure.peace.pikarin_janken (singleton method) #39
Conversation
zonuexe
commented
Aug 24, 2014
@@ -28,6 +28,18 @@ def self.method_missing(name, *args) | |||
super | |||
end | |||
end | |||
|
|||
class << self.peace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant self
detected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cure.peace
と Cure.cure_peace
で機能差分出るのは気持ち悪いので両方対応していただきたく。(別インスタンスなので。。。)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほど…
(%s) | ||
EOF | ||
def pikarin_janken | ||
print_by_line MESSAGE % HANDS.sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
引数ある場合はメソッド呼び出しの括弧ほしいです
bbd2860
to
e402aee
Compare
[Cure.peace, Cure.cure_peace].each do |peace| | ||
class << peace | ||
HANDS = | ||
(['グー'] * 13) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
e402aee
to
4795b51
Compare
@@ -157,4 +157,13 @@ | |||
it { expect{ subject }.to raise_error NoMethodError } | |||
end | |||
end | |||
|
|||
describe "cure_peace#pikarin_janken" do | |||
let(:girl){ Cure::peace } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
メソッド呼び出しでコロンは違和感あるのでドットで
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
拝承
Add Cure.peace.pikarin_janken (singleton method)