Class: WithFilters::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/with_filters/models/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, options = {}) ⇒ Action

Returns a new instance of Action.



5
6
7
8
9
10
11
12
# File 'lib/with_filters/models/action.rb', line 5

def initialize(type, options = {})
  @type = type

  options[:type]  = @type
  options[:value] = options.delete(:label) if options[:label]

  @attrs = options
end

Instance Attribute Details

#attrsObject

Returns the value of attribute attrs.



3
4
5
# File 'lib/with_filters/models/action.rb', line 3

def attrs
  @attrs
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/with_filters/models/action.rb', line 3

def type
  @type
end