Class: ConfBuilder::Talk
- Inherits:
-
Object
- Object
- ConfBuilder::Talk
- Defined in:
- lib/talk.rb
Direct Known Subclasses
Fortyfive_min_talk, Lightning_talk, Sixty_min_talk, Thirty_min_talk
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#duration_unit ⇒ Object
Returns the value of attribute duration_unit.
-
#speaker ⇒ Object
readonly
Returns the value of attribute speaker.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(params) ⇒ Talk
constructor
A new instance of Talk.
- #to_s ⇒ Object
Constructor Details
#initialize(params) ⇒ Talk
Returns a new instance of Talk.
12 13 14 15 16 |
# File 'lib/talk.rb', line 12 def initialize(params) @title = params[:title] @speaker = ['Uncle Bob Martin','Corey Haines','DHH'].sample self end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
8 9 10 |
# File 'lib/talk.rb', line 8 def duration @duration end |
#duration_unit ⇒ Object
Returns the value of attribute duration_unit.
9 10 11 |
# File 'lib/talk.rb', line 9 def duration_unit @duration_unit end |
#speaker ⇒ Object (readonly)
Returns the value of attribute speaker.
10 11 12 |
# File 'lib/talk.rb', line 10 def speaker @speaker end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/talk.rb', line 7 def title @title end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/talk.rb', line 18 def to_s "#{@title} #{@duration}#{duration_unit.slice(0, 3)}" end |