Module: CoreExtensions::ObjectExt
- Defined in:
- lib/content/pipeline/core_extensions/object_ext.rb
Instance Method Summary collapse
- #jruby? ⇒ Boolean
-
#to_nokogiri_fragment ⇒ Object
————————————————————————-.
Instance Method Details
#jruby? ⇒ Boolean
5 6 7 |
# File 'lib/content/pipeline/core_extensions/object_ext.rb', line 5 def jruby? RbConfig::CONFIG["ruby_install_name"] == "jruby" end |
#to_nokogiri_fragment ⇒ Object
11 12 13 14 |
# File 'lib/content/pipeline/core_extensions/object_ext.rb', line 11 def to_nokogiri_fragment return self if self.is_a?(Nokogiri::HTML::DocumentFragment) Nokogiri::HTML.fragment(self.to_s) end |