Class: Memoir::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/memoir/filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, tagk, filter, group_by = false) ⇒ Filter

Returns a new instance of Filter.



4
5
6
7
8
9
# File 'lib/memoir/filter.rb', line 4

def initialize(type, tagk, filter, group_by = false)
  @type = type
  @tagk = tagk
  @filter = filter
  @group_by = group_by
end

Instance Attribute Details

#filterObject

Returns the value of attribute filter.



2
3
4
# File 'lib/memoir/filter.rb', line 2

def filter
  @filter
end

#group_byObject

Returns the value of attribute group_by.



2
3
4
# File 'lib/memoir/filter.rb', line 2

def group_by
  @group_by
end

#tagkObject

Returns the value of attribute tagk.



2
3
4
# File 'lib/memoir/filter.rb', line 2

def tagk
  @tagk
end

#typeObject

Returns the value of attribute type.



2
3
4
# File 'lib/memoir/filter.rb', line 2

def type
  @type
end

Instance Method Details

#to_hObject



11
12
13
14
15
16
17
18
# File 'lib/memoir/filter.rb', line 11

def to_h
  {
    'type' => type,
    'tagk' => tagk,
    'filter' => filter,
    'groupBy' => group_by
  }
end