Class: Bitcharts::Scope
- Inherits:
-
Object
- Object
- Bitcharts::Scope
- Defined in:
- app/models/bitcharts/scope.rb
Instance Method Summary collapse
-
#initialize(scope) ⇒ Scope
constructor
A new instance of Scope.
- #to_i ⇒ Object
- #to_id ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(scope) ⇒ Scope
Returns a new instance of Scope.
3 4 5 |
# File 'app/models/bitcharts/scope.rb', line 3 def initialize(scope) @scope = scope end |
Instance Method Details
#to_i ⇒ Object
11 12 13 |
# File 'app/models/bitcharts/scope.rb', line 11 def to_i @scope.to_i end |
#to_id ⇒ Object
15 16 17 |
# File 'app/models/bitcharts/scope.rb', line 15 def to_id to_i == 0 ? nil : to_i end |
#to_s ⇒ Object
7 8 9 |
# File 'app/models/bitcharts/scope.rb', line 7 def to_s @scope end |