Class: Almicube::Selector::Base

Inherits:
Object
  • Object
show all
Includes:
Cog
Defined in:
lib/almicube/selector/base.rb

Direct Known Subclasses

AllSelector, HasManySelector, MethodSelector

Instance Attribute Summary collapse

Attributes included from Cog

#ranking

Instance Method Summary collapse

Methods included from Cog

#active?, #after_aggregate

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/almicube/selector/base.rb', line 8

def initialize(options={})
  @class_name = options[:class_name]
  @class_name = class_name.constantize if class_name.is_a? String
  @label = options[:label]
end

Instance Attribute Details

#class_nameObject (readonly) Also known as: model_class

Returns the value of attribute class_name.



6
7
8
# File 'lib/almicube/selector/base.rb', line 6

def class_name
  @class_name
end

Instance Method Details

#before_aggregateObject



24
25
# File 'lib/almicube/selector/base.rb', line 24

def before_aggregate
end

#data_provider?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/almicube/selector/base.rb', line 20

def data_provider?
  false
end

#interstoreObject



27
28
29
# File 'lib/almicube/selector/base.rb', line 27

def interstore
  nil
end

#labelObject



16
17
18
# File 'lib/almicube/selector/base.rb', line 16

def label
  @label
end