Class: UncleKryon::ReleaseData
- Defined in:
- lib/unclekryon/data/release_data.rb
Instance Attribute Summary collapse
-
#albums ⇒ Object
Returns the value of attribute albums.
-
#mirrors ⇒ Object
Returns the value of attribute mirrors.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from BaseData
Instance Method Summary collapse
-
#initialize ⇒ ReleaseData
constructor
A new instance of ReleaseData.
- #to_mini_s ⇒ Object
- #to_s(mini = false) ⇒ Object
Methods inherited from BaseData
#initialize_copy, #max_updated_on, max_updated_on, #max_updated_on_s, max_updated_on_s, #update
Constructor Details
#initialize ⇒ ReleaseData
Returns a new instance of ReleaseData.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/unclekryon/data/release_data.rb', line 23 def initialize super() @title = '' @url = '' @mirrors = {} @albums = [] end |
Instance Attribute Details
#albums ⇒ Object
Returns the value of attribute albums.
21 22 23 |
# File 'lib/unclekryon/data/release_data.rb', line 21 def albums @albums end |
#mirrors ⇒ Object
Returns the value of attribute mirrors.
19 20 21 |
# File 'lib/unclekryon/data/release_data.rb', line 19 def mirrors @mirrors end |
#title ⇒ Object
Returns the value of attribute title.
16 17 18 |
# File 'lib/unclekryon/data/release_data.rb', line 16 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
18 19 20 |
# File 'lib/unclekryon/data/release_data.rb', line 18 def url @url end |
Instance Method Details
#to_mini_s ⇒ Object
34 35 36 |
# File 'lib/unclekryon/data/release_data.rb', line 34 def to_mini_s return to_s(true) end |
#to_s(mini = false) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/unclekryon/data/release_data.rb', line 38 def to_s(mini=false) s = '' s << ('%-10s' % [@title]) s << (mini ? (' | %3d' % [@albums.length]) : ("\n- " << @albums.join("\n- "))) return s end |