Class: Hipbot::Plugins::MemeGenerator::Generator
- Inherits:
-
Object
- Object
- Hipbot::Plugins::MemeGenerator::Generator
- Defined in:
- lib/hipbot-plugins/meme_generator.rb
Instance Attribute Summary collapse
-
#lower_text ⇒ Object
readonly
Returns the value of attribute lower_text.
-
#meme ⇒ Object
readonly
Returns the value of attribute meme.
-
#upper_text ⇒ Object
readonly
Returns the value of attribute upper_text.
Instance Method Summary collapse
- #image_url ⇒ Object
-
#initialize(meme, text) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(meme, text) ⇒ Generator
Returns a new instance of Generator.
28 29 30 31 |
# File 'lib/hipbot-plugins/meme_generator.rb', line 28 def initialize meme, text @meme = meme assign_texts(text) end |
Instance Attribute Details
#lower_text ⇒ Object (readonly)
Returns the value of attribute lower_text.
27 28 29 |
# File 'lib/hipbot-plugins/meme_generator.rb', line 27 def lower_text @lower_text end |
#meme ⇒ Object (readonly)
Returns the value of attribute meme.
27 28 29 |
# File 'lib/hipbot-plugins/meme_generator.rb', line 27 def meme @meme end |
#upper_text ⇒ Object (readonly)
Returns the value of attribute upper_text.
27 28 29 |
# File 'lib/hipbot-plugins/meme_generator.rb', line 27 def upper_text @upper_text end |
Instance Method Details
#image_url ⇒ Object
33 34 35 36 |
# File 'lib/hipbot-plugins/meme_generator.rb', line 33 def image_url meme_name = self.class.memes.fetch(meme.to_s) "http://v1.memecaptain.com/#{meme_name}.png" end |