Class: Poke
- Inherits:
-
Object
- Object
- Poke
- Defined in:
- yard_sample.rb
Overview
あいさつをするためのクラス #
- Author
-
ryopeko
- Version
-
0.0.1
- License
-
Ruby License
Constant Summary
- VERSION =
このクラスのVersion
'0.0.1'
Instance Attribute Summary (collapse)
-
- (Object) authors
readonly
著者名が格納される.
-
- (Object) reader
読者名が格納される.
Instance Method Summary (collapse)
-
- (String) english(name = @reader)
英語のあいさつ文.
-
- (Poke) initialize(user_name = 'you')
constructor
Pokeインスタンス.
Constructor Details
- (Poke) initialize(user_name = 'you')
Pokeインスタンス
23 24 25 26 |
# File 'yard_sample.rb', line 23 def initialize(user_name='you') @reader = user_name @authors = %w(sugamasao takkanm hibariya ryopeko) end |
Instance Attribute Details
- (Object) authors (readonly)
著者名が格納される
14 15 16 |
# File 'yard_sample.rb', line 14 def @authors end |
- (Object) reader
読者名が格納される
11 12 13 |
# File 'yard_sample.rb', line 11 def reader @reader end |
Instance Method Details
- (String) english(name = @reader)
英語のあいさつ文
30 31 32 |
# File 'yard_sample.rb', line 30 def english(name=@reader) "Hello #{name}" end |