Class: Headmin::Filter::ButtonView

Inherits:
ViewModel
  • Object
show all
Defined in:
app/models/headmin/filter/button_view.rb

Instance Method Summary collapse

Methods inherited from ViewModel

#attributes, #initialize, #to_hash

Constructor Details

This class inherits a constructor from ViewModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ViewModel

Instance Method Details

#display_valuesObject



16
17
18
# File 'app/models/headmin/filter/button_view.rb', line 16

def display_values
  @display_values || []
end

#filterObject



20
21
22
# File 'app/models/headmin/filter/button_view.rb', line 20

def filter
  @filter || nil
end

#idObject



4
5
6
# File 'app/models/headmin/filter/button_view.rb', line 4

def id
  @id || SecureRandom.hex
end

#labelObject



12
13
14
# File 'app/models/headmin/filter/button_view.rb', line 12

def label
  @label || name.to_s.humanize
end

#nameObject



8
9
10
# File 'app/models/headmin/filter/button_view.rb', line 8

def name
  @name.to_sym
end