Class: RSolr::Message::Field
- Inherits:
-
Object
- Object
- RSolr::Message::Field
- Defined in:
- lib/rsolr/message/field.rb
Overview
A class that represents a “doc”/“field” xml element for a solr update
Instance Attribute Summary collapse
-
#attrs ⇒ Object
“attrs” is a hash for setting the “doc” xml attributes “value” is the text value for the node.
-
#value ⇒ Object
“attrs” is a hash for setting the “doc” xml attributes “value” is the text value for the node.
Instance Method Summary collapse
-
#initialize(attrs, value) ⇒ Field
constructor
“attrs” must be a hash “value” should be something that responds to #_to_s.
-
#name ⇒ Object
the value of the “name” attribute.
Constructor Details
#initialize(attrs, value) ⇒ Field
“attrs” must be a hash “value” should be something that responds to #_to_s
10 11 12 13 |
# File 'lib/rsolr/message/field.rb', line 10 def initialize(attrs, value) @attrs = attrs @value = value end |
Instance Attribute Details
#attrs ⇒ Object
“attrs” is a hash for setting the “doc” xml attributes “value” is the text value for the node
6 7 8 |
# File 'lib/rsolr/message/field.rb', line 6 def attrs @attrs end |
#value ⇒ Object
“attrs” is a hash for setting the “doc” xml attributes “value” is the text value for the node
6 7 8 |
# File 'lib/rsolr/message/field.rb', line 6 def value @value end |
Instance Method Details
#name ⇒ Object
the value of the “name” attribute
16 17 18 |
# File 'lib/rsolr/message/field.rb', line 16 def name @attrs[:name] end |