class YeshouaCrm::Liquid::CellsDrop
Public Class Methods
default_drop()
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 5 def self.default_drop self.new Cell.visible.order(:name) end
new(cells)
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 9 def initialize(cells) @cells = cells end
Public Instance Methods
active()
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 24 def active @active ||= @cells.select(&:active?).map do |cell| CellDrop.new cell end end
all()
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 18 def all @all ||= @cells.map do |cell| CellDrop.new cell end end
before_method(identifier)
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 13 def before_method(identifier) cell = @cells.where(:identifier => identifier).first || Cell.new CellDrop.new cell end
each(&block)
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 30 def each(&block) all.each(&block) end
size()
click to toggle source
# File lib/yeshoua_crm/liquid/drops/cells_drop.rb, line 34 def size @cells.size end