Class: EmbeddableContent::EmbeddedTagInfo
- Inherits:
-
Object
- Object
- EmbeddableContent::EmbeddedTagInfo
- Defined in:
- app/services/embeddable_content/embedded_tag_info.rb
Instance Attribute Summary collapse
-
#attr ⇒ Object
readonly
Returns the value of attribute attr.
-
#dom_node ⇒ Object
readonly
Returns the value of attribute dom_node.
-
#embedded_model ⇒ Object
readonly
Returns the value of attribute embedded_model.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
- #available? ⇒ Boolean
- #embedded_record ⇒ Object
- #embedded_record_ext ⇒ Object
- #embedded_record_id ⇒ Object
-
#initialize(record, embedded_model, attr, dom_node) ⇒ EmbeddedTagInfo
constructor
A new instance of EmbeddedTagInfo.
Constructor Details
#initialize(record, embedded_model, attr, dom_node) ⇒ EmbeddedTagInfo
Returns a new instance of EmbeddedTagInfo.
5 6 7 8 9 10 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 5 def initialize(record, , attr, dom_node) @record = record = @attr = attr @dom_node = dom_node end |
Instance Attribute Details
#attr ⇒ Object (readonly)
Returns the value of attribute attr.
3 4 5 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 3 def attr @attr end |
#dom_node ⇒ Object (readonly)
Returns the value of attribute dom_node.
3 4 5 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 3 def dom_node @dom_node end |
#embedded_model ⇒ Object (readonly)
Returns the value of attribute embedded_model.
3 4 5 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 3 def end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
3 4 5 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 3 def record @record end |
Instance Method Details
#available? ⇒ Boolean
12 13 14 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 12 def available? match.present? end |
#embedded_record ⇒ Object
24 25 26 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 24 def ||= .find end |
#embedded_record_ext ⇒ Object
20 21 22 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 20 def match.try :last end |
#embedded_record_id ⇒ Object
16 17 18 |
# File 'app/services/embeddable_content/embedded_tag_info.rb', line 16 def match.try :first end |