Class: OpenURL::Author
- Inherits:
-
Object
- Object
- OpenURL::Author
- Defined in:
- lib/openurl/metadata_formats/scholarly_common.rb
Instance Attribute Summary collapse
-
#au ⇒ Object
Returns the value of attribute au.
-
#aucorp ⇒ Object
Returns the value of attribute aucorp.
-
#aufirst ⇒ Object
Returns the value of attribute aufirst.
-
#auinit ⇒ Object
Returns the value of attribute auinit.
-
#auinit1 ⇒ Object
Returns the value of attribute auinit1.
-
#auinitm ⇒ Object
Returns the value of attribute auinitm.
-
#aulast ⇒ Object
Returns the value of attribute aulast.
-
#ausuffix ⇒ Object
Returns the value of attribute ausuffix.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize ⇒ Author
constructor
A new instance of Author.
- #xml(elem) ⇒ Object
Constructor Details
#initialize ⇒ Author
Returns a new instance of Author.
128 129 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 128 def initialize end |
Instance Attribute Details
#au ⇒ Object
Returns the value of attribute au.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def au @au end |
#aucorp ⇒ Object
Returns the value of attribute aucorp.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def aucorp @aucorp end |
#aufirst ⇒ Object
Returns the value of attribute aufirst.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def aufirst @aufirst end |
#auinit ⇒ Object
Returns the value of attribute auinit.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def auinit @auinit end |
#auinit1 ⇒ Object
Returns the value of attribute auinit1.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def auinit1 @auinit1 end |
#auinitm ⇒ Object
Returns the value of attribute auinitm.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def auinitm @auinitm end |
#aulast ⇒ Object
Returns the value of attribute aulast.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def aulast @aulast end |
#ausuffix ⇒ Object
Returns the value of attribute ausuffix.
126 127 128 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 126 def ausuffix @ausuffix end |
Instance Method Details
#empty? ⇒ Boolean
169 170 171 172 173 174 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 169 def empty? self.instance_variables.each do | ivar | return false if self.instance_variable_get(ivar) end return true end |
#xml(elem) ⇒ Object
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/openurl/metadata_formats/scholarly_common.rb', line 131 def xml(elem) if @au au = elem.add_element("#{elem.prefix}:au") au.text = @au end if @aucorp aucorp = elem.add_element("#{elem.prefix}:aucorp") aucorp.text = @aucorp end if @aulast || @aufirst || @auinit || @auinit1 || @auinitm || @ausuffix = elem.add_element("#{elem.prefix}:author") if @aulast aulast = .add_element("#{elem.prefix}:aulast") aulast.text = @aulast end if @aufirst aufirst = .add_element("#{elem.prefix}:aufirst") aufirst.text = @aufirst end if @auinit auinit = .add_element("#{elem.prefix}:auinit") auinit.text = @auinit end if @auinit1 auinit1 = .add_element("#{elem.prefix}:auinit1") auinit1.text = @auinit1 end if @auinitm auinitm = .add_element("#{elem.prefix}:auinitm") auinitm.text = @auinitm end if @ausuffix ausuff = .add_element("#{elem.prefix}:ausuffix") ausuff.text = @ausuffix end end end |