Module: Extractula::OEmbed::ClassMethods
- Defined in:
- lib/extractula/oembed.rb
Instance Method Summary collapse
- #oembed_endpoint(url = nil) ⇒ Object
- #oembed_format_param_required? ⇒ Boolean
- #oembed_max_height(height = nil) ⇒ Object
- #oembed_max_width(width = nil) ⇒ Object
Instance Method Details
#oembed_endpoint(url = nil) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/extractula/oembed.rb', line 34 def (url = nil) if url = url if .match(/\.(xml|json)$/) = false .sub!(/\.xml$/, '.json') if $1 == 'xml' else = true end end end |
#oembed_format_param_required? ⇒ Boolean
57 58 59 |
# File 'lib/extractula/oembed.rb', line 57 def end |
#oembed_max_height(height = nil) ⇒ Object
52 53 54 55 |
# File 'lib/extractula/oembed.rb', line 52 def (height = nil) = height if height || OEmbed.max_height end |
#oembed_max_width(width = nil) ⇒ Object
47 48 49 50 |
# File 'lib/extractula/oembed.rb', line 47 def (width = nil) = width if width || OEmbed.max_width end |