Module: CoreExtensions::ObjectExt

Defined in:
lib/content/pipeline/core_extensions/object_ext.rb

Instance Method Summary collapse

Instance Method Details

#jruby?Boolean

Returns:

  • (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_fragmentObject




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