Class: EmbedRb::Gmap
- Inherits:
-
Object
- Object
- EmbedRb::Gmap
- Defined in:
- lib/embedrb/embed_gmap.rb
Instance Method Summary collapse
-
#initialize(input, output, options, embeds) ⇒ Gmap
constructor
A new instance of Gmap.
- #process ⇒ Object
Constructor Details
#initialize(input, output, options, embeds) ⇒ Gmap
Returns a new instance of Gmap.
7 8 9 10 11 12 13 |
# File 'lib/embedrb/embed_gmap.rb', line 7 def initialize(input, output, , ) @input = input @output = output = = @regex = /@\((.+)\)/i end |
Instance Method Details
#process ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/embedrb/embed_gmap.rb', line 15 def process() if [:gmapOptions][:googleAuthKey] @input.scan(@regex) {|match| location = match[0] << { key: match, text: render(location) } } end @output end |