Class: Steep::Project::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/project/group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, name, source_pattern, inline_source_pattern, signature_pattern, code_diagnostics_config) ⇒ Group

Returns a new instance of Group.



11
12
13
14
15
16
17
18
# File 'lib/steep/project/group.rb', line 11

def initialize(target, name, source_pattern, inline_source_pattern, signature_pattern, code_diagnostics_config)
  @target = target
  @name = name
  @source_pattern = source_pattern
  @inline_source_pattern = inline_source_pattern
  @signature_pattern = signature_pattern
  @code_diagnostics_config = code_diagnostics_config
end

Instance Attribute Details

#code_diagnostics_configObject (readonly)

Returns the value of attribute code_diagnostics_config.



9
10
11
# File 'lib/steep/project/group.rb', line 9

def code_diagnostics_config
  @code_diagnostics_config
end

#inline_source_patternObject (readonly)

Returns the value of attribute inline_source_pattern.



6
7
8
# File 'lib/steep/project/group.rb', line 6

def inline_source_pattern
  @inline_source_pattern
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/steep/project/group.rb', line 4

def name
  @name
end

#signature_patternObject (readonly)

Returns the value of attribute signature_pattern.



7
8
9
# File 'lib/steep/project/group.rb', line 7

def signature_pattern
  @signature_pattern
end

#source_patternObject (readonly)

Returns the value of attribute source_pattern.



5
6
7
# File 'lib/steep/project/group.rb', line 5

def source_pattern
  @source_pattern
end

#targetObject (readonly)

Returns the value of attribute target.



8
9
10
# File 'lib/steep/project/group.rb', line 8

def target
  @target
end

Instance Method Details

#possible_inline_source_file?(path) ⇒ Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/steep/project/group.rb', line 32

def possible_inline_source_file?(path)
  inline_source_pattern =~ path
end

#possible_signature_file?(path) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/steep/project/group.rb', line 28

def possible_signature_file?(path)
  signature_pattern =~ path
end

#possible_source_file?(path) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/steep/project/group.rb', line 24

def possible_source_file?(path)
  source_pattern =~ path && inline_source_pattern !~ path
end

#projectObject



20
21
22
# File 'lib/steep/project/group.rb', line 20

def project
  target.project
end