Class: RicherText::Embed
- Inherits:
-
Object
- Object
- RicherText::Embed
- Includes:
- Rendering
- Defined in:
- lib/richer_text/embed.rb
Instance Attribute Summary collapse
-
#embed ⇒ Object
readonly
Returns the value of attribute embed.
Class Method Summary collapse
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(embed) ⇒ Embed
constructor
A new instance of Embed.
- #object ⇒ Object
Constructor Details
#initialize(embed) ⇒ Embed
Returns a new instance of Embed.
12 13 14 |
# File 'lib/richer_text/embed.rb', line 12 def initialize() @embed = end |
Instance Attribute Details
#embed ⇒ Object (readonly)
Returns the value of attribute embed.
10 11 12 |
# File 'lib/richer_text/embed.rb', line 10 def @embed end |
Class Method Details
.find(sgid) ⇒ Object
5 6 7 8 |
# File 'lib/richer_text/embed.rb', line 5 def self.find(sgid) @embed = GlobalID::Locator.locate_signed(sgid, for: "embeddable") new(@embed) if @embed end |
Instance Method Details
#html ⇒ Object
23 24 25 |
# File 'lib/richer_text/embed.rb', line 23 def html render partial: to_richer_text_editor_partial_path, object: object, as: model_name.element end |
#object ⇒ Object
16 17 18 |
# File 'lib/richer_text/embed.rb', line 16 def object @embed end |