Module: CircleSpeechBalloon::SpeechModule
- Defined in:
- lib/circle_speech_balloon.rb
Instance Method Summary collapse
- #arrayed_quotes ⇒ Object
- #new_speech(params = {}) ⇒ Object
- #parsed_settings ⇒ Object
- #speech_extend ⇒ Object
- #speech_extend=(params) ⇒ Object
- #supply_default ⇒ Object
Instance Method Details
#arrayed_quotes ⇒ Object
106 107 108 |
# File 'lib/circle_speech_balloon.rb', line 106 def arrayed_quotes @arrayed_quotes ||= (self.quotes.blank? ? self.parsed_settings['speech_balloon']['quotes'].to_s : self.quotes).split(/ /) end |
#new_speech(params = {}) ⇒ Object
97 98 99 100 |
# File 'lib/circle_speech_balloon.rb', line 97 def new_speech params = {} @speech_extend = CircleSpeechBalloon::Speech.new params @speech_extend.supply_default end |
#parsed_settings ⇒ Object
102 103 104 |
# File 'lib/circle_speech_balloon.rb', line 102 def parsed_settings @parsed_settings ||= self.speech_balloon_template.parsed_settings end |
#speech_extend ⇒ Object
88 89 90 91 |
# File 'lib/circle_speech_balloon.rb', line 88 def speech_extend self.new_speech unless @speech_extend @speech_extend end |
#speech_extend=(params) ⇒ Object
93 94 95 |
# File 'lib/circle_speech_balloon.rb', line 93 def speech_extend= params @speech_extend = CircleSpeechBalloon::Speech.new params end |
#supply_default ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/circle_speech_balloon.rb', line 76 def supply_default s = self.parsed_settings['0']['speech'] self.x = s['x_rate'] self.y = s['y_rate'] self.width = s['width_rate'] self.height = s['height_rate'] self.quotes = '' self.font_size = self.parsed_settings['speech_balloon']['default_font_size'] self.text_align = self.parsed_settings['speech_balloon']['default_text_align'] self.fore_color = self.parsed_settings['speech_balloon']['default_fore_color'] end |