Class: RSolr::Xml::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/rsolr/xml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs, value) ⇒ Field

“attrs” must be a hash “value” should be something that responds to #_to_s


85
86
87
88
# File 'lib/rsolr/xml.rb', line 85

def initialize(attrs, value)
  @attrs = attrs
  @value = value
end

Instance Attribute Details

#attrsObject

“attrs” is a hash for setting the “doc” xml attributes “value” is the text value for the node


81
82
83
# File 'lib/rsolr/xml.rb', line 81

def attrs
  @attrs
end

#valueObject

“attrs” is a hash for setting the “doc” xml attributes “value” is the text value for the node


81
82
83
# File 'lib/rsolr/xml.rb', line 81

def value
  @value
end

Instance Method Details

#nameObject

the value of the “name” attribute


91
92
93
# File 'lib/rsolr/xml.rb', line 91

def name
  @attrs[:name]
end