Class: UncleKryon::AumData

Inherits:
BaseData show all
Defined in:
lib/unclekryon/data/aum_data.rb

Instance Attribute Summary collapse

Attributes inherited from BaseData

#updated_on

Instance Method Summary collapse

Methods inherited from BaseData

#initialize_copy, #max_updated_on, max_updated_on, #max_updated_on_s, max_updated_on_s, #update

Constructor Details

#initializeAumData

Returns a new instance of AumData.



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/unclekryon/data/aum_data.rb', line 26

def initialize
  super()

  @title = ''
  @subtitle = ''
  @languages = []
  @timespan = ''
  @filesize = ''
  @filename = ''

  @url = ''
  @mirrors = {}
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



21
22
23
# File 'lib/unclekryon/data/aum_data.rb', line 21

def filename
  @filename
end

#filesizeObject

Returns the value of attribute filesize.



20
21
22
# File 'lib/unclekryon/data/aum_data.rb', line 20

def filesize
  @filesize
end

#languagesObject

Returns the value of attribute languages.



18
19
20
# File 'lib/unclekryon/data/aum_data.rb', line 18

def languages
  @languages
end

#mirrorsObject

Returns the value of attribute mirrors.



24
25
26
# File 'lib/unclekryon/data/aum_data.rb', line 24

def mirrors
  @mirrors
end

#subtitleObject

Returns the value of attribute subtitle.



17
18
19
# File 'lib/unclekryon/data/aum_data.rb', line 17

def subtitle
  @subtitle
end

#timespanObject

Returns the value of attribute timespan.



19
20
21
# File 'lib/unclekryon/data/aum_data.rb', line 19

def timespan
  @timespan
end

#titleObject

Returns the value of attribute title.



16
17
18
# File 'lib/unclekryon/data/aum_data.rb', line 16

def title
  @title
end

#urlObject

Returns the value of attribute url.



23
24
25
# File 'lib/unclekryon/data/aum_data.rb', line 23

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object

Excludes @updated_on



41
42
43
44
45
46
47
48
49
50
# File 'lib/unclekryon/data/aum_data.rb', line 41

def ==(other)
  return @title == other.title &&
         @subtitle == other.subtitle &&
         @languages == other.languages &&
         @timespan == other.timespan &&
         @filesize == other.filesize &&
         @filename == other.filename &&
         @url == other.url &&
         @mirrors == other.mirrors
end

#to_sObject



52
53
54
55
56
57
58
59
60
61
# File 'lib/unclekryon/data/aum_data.rb', line 52

def to_s
  s = ''
  s << ('%-40s' % [@title])
  s << (' | %30s' % [@subtitle])
  s << (' | %10s' % [@languages.join(';')])
  s << (' | %10s' % [@timespan])
  s << (' | %10s' % [@filesize])
  s << (' | %30s' % [@filename])
  return s
end