context-filters 0.0.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fefdc786067150db5a30a0f0d3951a8400dfaea
4
- data.tar.gz: ceee00abeae9a01b2190f7dca8c903cd1e4125ed
3
+ metadata.gz: 8430ac712eba84a90d2ab08862e6e0142da1b748
4
+ data.tar.gz: 126e1743e161e5fef693d9b7b5727b6c983d2cec
5
5
  SHA512:
6
- metadata.gz: b54f7a9eb75421d1eccc8ba97b80e823dba1a1748cd1b5c66046f7e133f3f914a029376e84521f6b5b39cded1d9e228c39a8c56e79dbfdb4c29231168408bcec
7
- data.tar.gz: dcfd179c6eb7d3965cf28b687fd515ae4003a88d2690b894f38d1a75b5e0712a330ef983e656cbb361a4ce8e536e21293faafbf9a4be0e18a581b2352bf372ac
6
+ metadata.gz: d8cdbf06f99de8383c8f58a3b43e632dd9ea6efce6da803059e3b1a370d4dcc94881bacce51aff79b1570ef9b90c928f3ab295e121928dd7389958b7c3d3d5f6
7
+ data.tar.gz: fb036b5357b25b824b63f577e5a3f897c80d2c015df1f46938f9849e966eda20626997ca8a60fb5d31c3d9aacb1d13f43f9d4a678ab33a8e9dd58d52a5dc88fb
@@ -9,11 +9,12 @@ require "context-filters/local_context"
9
9
 
10
10
  # manipulate set of context and filters for it,
11
11
  # allow evaluating filters in given context
12
- class ContextFilters::Context < CommandDesigner::GlobalContext
12
+ class ContextFilters::Context < ContextFilters::GlobalContext
13
13
 
14
14
  include ContextFilters::LocalContext
15
15
 
16
16
  # run the given method on global and local filters
17
+ # @param method [Proc] the method to evaluate for filters matching context
17
18
  def evaluate_filters(method)
18
19
  super(method) do
19
20
  evaluate_local_filters(method)
@@ -11,9 +11,11 @@ require "context-filters/priority_filters"
11
11
  class ContextFilters::GlobalContext
12
12
 
13
13
  # @return [Array] the context stack
14
+ # @api private
14
15
  attr_reader :context
15
16
 
16
17
  # @return [PriorityFilters] shared list of filters
18
+ # @api private
17
19
  attr_reader :priority_filters
18
20
 
19
21
  # initialize new GlobalContext, works in two modes:
@@ -10,6 +10,7 @@ require "context-filters/version"
10
10
  module ContextFilters::LocalContext
11
11
 
12
12
  # @return [Array<Proc>] list of blocks to evaluate
13
+ # @api private
13
14
  def local_filters
14
15
  @local_filters ||= []
15
16
  end
@@ -32,6 +33,7 @@ module ContextFilters::LocalContext
32
33
  #
33
34
  # @param method [Proc] a method to call with each filter stored in
34
35
  # +local_filters+
36
+ # @api private
35
37
  def evaluate_local_filters(method)
36
38
  local_filters.each { |block| method.call(&block) }
37
39
  end
@@ -9,6 +9,7 @@ require "context-filters/filters"
9
9
  # list of +filters+ sorted by +priorities+
10
10
  class ContextFilters::PriorityFilters
11
11
 
12
+ # @return [Array] list of priorities this object was initialized with
12
13
  attr_reader :priorities
13
14
 
14
15
  # initializes priorities and coresponding list of filters
@@ -1,5 +1,5 @@
1
1
  # Build command text based on multiple filters
2
2
  class ContextFilters
3
3
  # version of the context-filters gem
4
- VERSION = "0.0.1"
4
+ VERSION = "0.8.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: context-filters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Papis