Class: Attr::Gather::Filters::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/attr/gather/filters/result.rb

Overview

Result of a filter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, filterings) ⇒ Result

Returns a new instance of Result.



16
17
18
19
# File 'lib/attr/gather/filters/result.rb', line 16

def initialize(value, filterings)
  @value = value
  @filterings = filterings
end

Instance Attribute Details

#filteringsArray<Attr::Gather::Filtering> (readonly)

Returns info about filtered items.

Returns:

  • (Array<Attr::Gather::Filtering>)

    info about filtered items



13
14
15
16
17
18
19
20
# File 'lib/attr/gather/filters/result.rb', line 13

class Result
  attr_reader :value, :filterings

  def initialize(value, filterings)
    @value = value
    @filterings = filterings
  end
end

#valueHash (readonly)

Returns the filtered hash.

Returns:

  • (Hash)

    the filtered hash



13
14
15
16
17
18
19
20
# File 'lib/attr/gather/filters/result.rb', line 13

class Result
  attr_reader :value, :filterings

  def initialize(value, filterings)
    @value = value
    @filterings = filterings
  end
end