Class: UEncode::Metadata

Inherits:
Object
  • Object
show all
Includes:
AttrSetting
Defined in:
lib/uencode/elements.rb

Constant Summary collapse

ATTRIBUTES =
[:title, :author, :composer, :album, :year, :track, :comment, :genre, :copyright, :description, :synopsis, :show, :episode_id, :network]

Instance Method Summary collapse

Methods included from AttrSetting

included, #initialize, #set_attributes

Instance Method Details

#to_xmlObject



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/uencode/elements.rb', line 197

def to_xml
  %Q{
    <meta>
    #{!title.nil? ? '<title>' + title.to_s + '</title>' : ""}
    #{!author.nil? ? '<author>' + author.to_s + '</author>' : ""}
    #{!composer.nil? ? '<composer>' + composer.to_s + '</composer>' : ""}
    #{!album.nil? ? '<album>' + album.to_s + '</album>' : ""}
    #{!year.nil? ? '<year>' + year.to_s + '</year>' : ""}
    #{!track.nil? ? '<track>' + track.to_s + '</track>' : ""}
    #{!comment.nil? ? '<comment>' + comment.to_s + '</comment>' : ""}
    #{!genre.nil? ? '<genre>' + genre.to_s + '</genre>' : ""}
    #{!copyright.nil? ? '<copyright>' + copyright.to_s + '</copyright>' : ""}
    #{!description.nil? ? '<description>' + description.to_s + '</description>' : ""}
    #{!synopsis.nil? ? '<synopsis>' + synopsis.to_s + '</synopsis>' : ""}
    #{!show.nil? ? '<show>' + show.to_s + '</show>' : ""}
    #{!episode_id.nil? ? '<episode_id>' + episode_id.to_s + '</episode_id>' : ""}
    #{!network.nil? ? '<network>' + network.to_s + '</network>' : ""}
    </meta>
  }
end