Class: TweetingCake::CakeSlicer
- Inherits:
-
Object
- Object
- TweetingCake::CakeSlicer
- Defined in:
- lib/tweeting_cake/cake_slicer.rb
Instance Attribute Summary collapse
-
#twitter_client ⇒ Object
readonly
Returns the value of attribute twitter_client.
Instance Method Summary collapse
-
#initialize(twitter_client) ⇒ CakeSlicer
constructor
A new instance of CakeSlicer.
- #serve_a_slice_from(cake) ⇒ Object
Constructor Details
#initialize(twitter_client) ⇒ CakeSlicer
Returns a new instance of CakeSlicer.
5 6 7 |
# File 'lib/tweeting_cake/cake_slicer.rb', line 5 def initialize(twitter_client) @twitter_client = twitter_client end |
Instance Attribute Details
#twitter_client ⇒ Object (readonly)
Returns the value of attribute twitter_client.
3 4 5 |
# File 'lib/tweeting_cake/cake_slicer.rb', line 3 def twitter_client @twitter_client end |
Instance Method Details
#serve_a_slice_from(cake) ⇒ Object
9 10 11 |
# File 'lib/tweeting_cake/cake_slicer.rb', line 9 def serve_a_slice_from(cake) twitter_client.tweet(cake.tweetable_description) end |