Class: Spree::TestingSupport::Microdata::Document
- Inherits:
-
Object
- Object
- Spree::TestingSupport::Microdata::Document
- Defined in:
- lib/spree/testing_support/microdata.rb
Overview
code extracted and modified from ‘microdata’ gem
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
Instance Method Summary collapse
- #extract_items ⇒ Object
-
#initialize(content) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(content) ⇒ Document
Returns a new instance of Document.
8 9 10 11 12 13 14 |
# File 'lib/spree/testing_support/microdata.rb', line 8 def initialize(content) ActiveSupport::Deprecation.warn(<<-EOS, caller) Spree::TestingSupport::Microdata will be removed in Spree 3.4 EOS @doc = Nokogiri::HTML(content) @items = extract_items end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
6 7 8 |
# File 'lib/spree/testing_support/microdata.rb', line 6 def doc @doc end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
6 7 8 |
# File 'lib/spree/testing_support/microdata.rb', line 6 def items @items end |