Class: Raz::Items::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/raz/items/group.rb

Direct Known Subclasses

Application

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ Group

Returns a new instance of Group.

Parameters:

  • name (String)

    name of this group

  • block (Proc)

    block where is specified all paths



20
21
22
23
24
25
26
# File 'lib/raz/items/group.rb', line 20

def initialize(name, &block)
  @name = name
  @paths = []
  @ignored_paths = []

  instance_eval(&block) unless block.nil?
end

Instance Attribute Details

#ignored_pathsArray<String> (readonly)

Returns:

  • (Array<String>)


15
16
17
# File 'lib/raz/items/group.rb', line 15

def ignored_paths
  @ignored_paths
end

#nameString (readonly)

Returns:

  • (String)


7
8
9
# File 'lib/raz/items/group.rb', line 7

def name
  @name
end

#pathsArray<String> (readonly)

Returns:

  • (Array<String>)


11
12
13
# File 'lib/raz/items/group.rb', line 11

def paths
  @paths
end

Instance Method Details

#ignore_path(path) ⇒ Object

Parameters:

  • path (String)

    path to file



38
39
40
# File 'lib/raz/items/group.rb', line 38

def ignore_path(path)
  @ignored_paths << path
end

#path(path) ⇒ Object

Parameters:

  • path (String)

    path to file



32
33
34
# File 'lib/raz/items/group.rb', line 32

def path(path)
  @paths << path
end