Class: Bitcharts::Scope

Inherits:
Object
  • Object
show all
Defined in:
app/models/bitcharts/scope.rb

Instance Method Summary collapse

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_iObject



11
12
13
# File 'app/models/bitcharts/scope.rb', line 11

def to_i
  @scope.to_i
end

#to_idObject



15
16
17
# File 'app/models/bitcharts/scope.rb', line 15

def to_id
  to_i == 0 ? nil : to_i
end

#to_sObject



7
8
9
# File 'app/models/bitcharts/scope.rb', line 7

def to_s
  @scope
end