Class: Embedda
- Inherits:
-
Object
- Object
- Embedda
- Defined in:
- lib/embedda.rb,
lib/embedda/filters/vimeo.rb,
lib/embedda/filters/youtube.rb,
lib/embedda/filters/provider.rb,
lib/embedda/filters/soundcloud.rb
Defined Under Namespace
Modules: Filters Classes: UnknownFilter
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
- #embed ⇒ Object
-
#initialize(string_to_process, options = {}) ⇒ Embedda
constructor
A new instance of Embedda.
Constructor Details
#initialize(string_to_process, options = {}) ⇒ Embedda
Returns a new instance of Embedda.
12 13 14 15 |
# File 'lib/embedda.rb', line 12 def initialize(string_to_process, = {}) = () @string = string_to_process.to_s end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/embedda.rb', line 10 def end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
10 11 12 |
# File 'lib/embedda.rb', line 10 def string @string end |
Instance Method Details
#embed ⇒ Object
17 18 19 20 21 |
# File 'lib/embedda.rb', line 17 def return @string if @string.empty? process_string_with_all_filters @string end |