Class: ActiveFedora::Rdf::NodeConfig
- Inherits:
-
Object
- Object
- ActiveFedora::Rdf::NodeConfig
- Defined in:
- lib/active_fedora/rdf/node_config.rb
Defined Under Namespace
Classes: IndexObject
Instance Attribute Summary collapse
-
#behaviors ⇒ Object
Returns the value of attribute behaviors.
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#multivalue ⇒ Object
Returns the value of attribute multivalue.
-
#predicate ⇒ Object
Returns the value of attribute predicate.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(predicate, args = {}) ⇒ NodeConfig
constructor
A new instance of NodeConfig.
- #with_index {|iobj| ... } ⇒ Object
Constructor Details
#initialize(predicate, args = {}) ⇒ NodeConfig
Returns a new instance of NodeConfig.
6 7 8 9 10 11 |
# File 'lib/active_fedora/rdf/node_config.rb', line 6 def initialize(predicate, args={}) self.predicate = predicate self.class_name = args.delete(:class_name) self.multivalue = args.delete(:multivalue) { true } raise ArgumentError, "Invalid arguments for Rdf Node configuration: #{args} on #{predicate}" unless args.empty? end |
Instance Attribute Details
#behaviors ⇒ Object
Returns the value of attribute behaviors.
4 5 6 |
# File 'lib/active_fedora/rdf/node_config.rb', line 4 def behaviors @behaviors end |
#class_name ⇒ Object
Returns the value of attribute class_name.
4 5 6 |
# File 'lib/active_fedora/rdf/node_config.rb', line 4 def class_name @class_name end |
#multivalue ⇒ Object
Returns the value of attribute multivalue.
4 5 6 |
# File 'lib/active_fedora/rdf/node_config.rb', line 4 def multivalue @multivalue end |
#predicate ⇒ Object
Returns the value of attribute predicate.
4 5 6 |
# File 'lib/active_fedora/rdf/node_config.rb', line 4 def predicate @predicate end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/active_fedora/rdf/node_config.rb', line 4 def type @type end |
Instance Method Details
#with_index {|iobj| ... } ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/active_fedora/rdf/node_config.rb', line 14 def with_index (&block) # needed for solrizer integration iobj = IndexObject.new yield iobj self.type = iobj.data_type self.behaviors = iobj.behaviors end |