Class Scrobbler::Chart
In: lib/scrobbler/chart.rb
Parent: Base

Methods

from   from=   new   new_from_xml   to   to=  

Public Class methods

[Source]

    # File lib/scrobbler/chart.rb, line 8
 8:     def initialize(from, to)
 9:       raise ArgumentError, "From is required" if from.blank?
10:       raise ArgumentError, "To is required" if to.blank?
11:       @from = from
12:       @to = to
13:     end

[Source]

   # File lib/scrobbler/chart.rb, line 4
4:       def new_from_xml(xml, doc)
5:         Chart.new(xml['from'], xml['to'])
6:       end

Public Instance methods

[Source]

    # File lib/scrobbler/chart.rb, line 23
23:     def from
24:       @from.to_i
25:     end

[Source]

    # File lib/scrobbler/chart.rb, line 15
15:     def from=(value)
16:       @from = value.to_i
17:     end

[Source]

    # File lib/scrobbler/chart.rb, line 27
27:     def to
28:       @to.to_i
29:     end

[Source]

    # File lib/scrobbler/chart.rb, line 19
19:     def to=(value)
20:       @to = value.to_i
21:     end

[Validate]