方法
屬性
[R] | content_type | |
[R] | height | |
[R] | url | |
[R] | width |
類別公開方法
from_node(node) 連結
來源: 顯示 | 在 GitHub 上
# File actiontext/lib/action_text/attachables/remote_image.rb, line 11 def from_node(node) if node["url"] && content_type_is_image?(node["content-type"]) new(attributes_from_node(node)) end end
new(attributes = {}) 連結
來源: 顯示 | 在 GitHub 上
# File actiontext/lib/action_text/attachables/remote_image.rb, line 32 def initialize(attributes = {}) @url = attributes[:url] @content_type = attributes[:content_type] @width = attributes[:width] @height = attributes[:height] end
實例公開方法
attachable_plain_text_representation(caption) 連結
來源: 顯示 | 在 GitHub 上
# File actiontext/lib/action_text/attachables/remote_image.rb, line 39 def attachable_plain_text_representation(caption) "[#{caption || "Image"}]" end
to_partial_path() 連結
來源: 顯示 | 在 GitHub 上
# File actiontext/lib/action_text/attachables/remote_image.rb, line 43 def to_partial_path "action_text/attachables/remote_image" end