Module: CoreExtensions::ObjectExt

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

Overview


Object Extensions.


Instance Method Summary collapse

Instance Method Details

#jruby?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/content/pipeline/core_extensions/object_ext.rb', line 10

def jruby?
  RbConfig::CONFIG["ruby_install_name"] == "jruby"
end

#to_nokogiri_fragmentObject


Convert an element to a Nokogiri document fragment.




18
19
20
# File 'lib/content/pipeline/core_extensions/object_ext.rb', line 18

def to_nokogiri_fragment
  Nokogiri::HTML.fragment(self.to_s)
end