Class: FilterParam::Scope

Inherits:
Object
  • Object
show all
Defined in:
lib/filter_param/scope.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = {}) ⇒ Scope

Returns a new instance of Scope.



5
6
7
8
# File 'lib/filter_param/scope.rb', line 5

def initialize(name, options = {})
  @name = name
  @rename = scope_rename(options[:rename])
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/filter_param/scope.rb', line 3

def name
  @name
end

Instance Method Details

#actual_nameObject



10
11
12
# File 'lib/filter_param/scope.rb', line 10

def actual_name
  rename.presence || name
end