Sha256: 91b245a99b1076232bdf476bd4c3484ad5eb16478ea0f14c60ca67eb17cd77dc

Contents?: true

Size: 430 Bytes

Versions: 8

Compression:

Stored size: 430 Bytes

Contents

module Refine::Conditions::HasIcon
  def icon_class
    @icon_class ||= nil
  end

  def icon_template
    @icon_template ||= {}
  end

  def with_icon_class(icon_class)
    @icon_class = icon_class
    self
  end

  def with_icon_template(template_path:, locals: {})
    @icon_template = { template_path: template_path, locals: locals }
    self
  end

  def has_icon?
    icon_class.present? || !icon_template.empty?
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
refine-rails-2.11.8 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.6 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.5 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.4 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.3 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.2 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.1 app/models/refine/conditions/has_icon.rb
refine-rails-2.11.0 app/models/refine/conditions/has_icon.rb