Module: ArticleJSON::Import::GoogleDoc::HTML::Shared::Float
- Included in:
- ImageParser, QuoteParser, TextBoxParser
- Defined in:
- lib/article_json/import/google_doc/html/shared/float.rb
Instance Method Summary collapse
-
#float ⇒ Symbol
Check if the quote is floating (left, right or not at all).
Instance Method Details
#float ⇒ Symbol
Check if the quote is floating (left, right or not at all)
9 10 11 12 13 14 15 |
# File 'lib/article_json/import/google_doc/html/shared/float.rb', line 9 def float return unless @float_node.has_attribute?('class') node_class = @float_node.attribute('class').value || '' return :right if @css_analyzer.right_aligned?(node_class) return :left if @css_analyzer.left_aligned?(node_class) nil end |