class UncleKryon::PicData
Attributes
alt[RW]
caption[RW]
filename[RW]
mirrors[RW]
name[RW]
url[RW]
Public Class Methods
new()
click to toggle source
Calls superclass method
UncleKryon::BaseData::new
# File lib/unclekryon/data/pic_data.rb, line 25 def initialize super() @name = '' @filename = '' @alt = '' @caption = '' @url = '' @mirrors = {} end
Public Instance Methods
==(other)
click to toggle source
Excludes @updated_on
# File lib/unclekryon/data/pic_data.rb, line 39 def ==(other) return @name == other.name && @filename == other.filename && @alt == other.alt && @caption == other.caption && @url == other.url && @mirrors == other.mirrors end
to_s()
click to toggle source
# File lib/unclekryon/data/pic_data.rb, line 48 def to_s s = ''.dup if @name.empty? || @name.strip.empty? s << ('%-100s' % [@url]) else s << ('%-30s' % [@name]) s << (' | %30s' % [@filename]) unless @name == @filename s << (' | %30s' % [@alt]) unless @name == @alt s << (' | %60s' % [@caption]) end return s end