class Onebox::Engine::TrelloOnebox

Public Instance Methods

placeholder_html() click to toggle source
# File lib/onebox/engine/trello_onebox.rb, line 22
def placeholder_html
  ::Onebox::Helpers.generic_placeholder_html
end
to_html() click to toggle source
# File lib/onebox/engine/trello_onebox.rb, line 13
      def to_html
        src = "https://trello.com/#{match[:type]}/#{match[:key]}.html"
        height = match[:type] == 'b' ? 400 : 200

        <<-HTML
          <iframe src="#{src}" width="100%" height="#{height}" frameborder="0" style="border:0"></iframe>
        HTML
      end

Private Instance Methods

match() click to toggle source
# File lib/onebox/engine/trello_onebox.rb, line 28
def match
  return @match if defined?(@match)
  @match = @url.match(%{trello\.com/(?<type>[^/]+)/(?<key>[^/]+)/?\W*})
end