Class: Carnival::Scope
- Inherits:
-
Object
- Object
- Carnival::Scope
- Defined in:
- app/models/carnival/scope.rb
Instance Method Summary collapse
- #default? ⇒ Boolean
-
#initialize(name, params = {}) ⇒ Scope
constructor
A new instance of Scope.
- #name ⇒ Object
Constructor Details
#initialize(name, params = {}) ⇒ Scope
Returns a new instance of Scope.
3 4 5 6 |
# File 'app/models/carnival/scope.rb', line 3 def initialize(name, params={}) @params = params @name = name end |
Instance Method Details
#default? ⇒ Boolean
8 9 10 |
# File 'app/models/carnival/scope.rb', line 8 def default? @params[:default].present? && @params[:default] == true end |
#name ⇒ Object
12 13 14 |
# File 'app/models/carnival/scope.rb', line 12 def name @name end |