Class: Pod::Hooks::PodRepresentation

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/hooks/pod_representation.rb

Overview

Stores the information of the Installer for the hooks

Instance Attribute Summary collapse

Private implementation collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, file_accessors) ⇒ PodRepresentation

Returns a new instance of PodRepresentation.

Parameters:



57
58
59
60
# File 'lib/cocoapods/hooks/pod_representation.rb', line 57

def initialize(name, file_accessors)
  @name = name
  @file_accessors = file_accessors
end

Instance Attribute Details

#nameString

Returns:

  • (String)


19
20
21
# File 'lib/cocoapods/hooks/pod_representation.rb', line 19

def name
  @name
end

Instance Method Details

#rootPathname

Returns:

  • (Pathname)


41
42
43
# File 'lib/cocoapods/hooks/pod_representation.rb', line 41

def root
  file_accessors.first.path_list.root
end

#root_specSpecification

Returns:



29
30
31
# File 'lib/cocoapods/hooks/pod_representation.rb', line 29

def root_spec
  file_accessors.first.spec.root
end

#source_filesArray<Pathname>

Returns:

  • (Array<Pathname>)


47
48
49
# File 'lib/cocoapods/hooks/pod_representation.rb', line 47

def source_files
  file_accessors.map(&:source_files).flatten.uniq
end

#specsArray<Specification>

Returns:



35
36
37
# File 'lib/cocoapods/hooks/pod_representation.rb', line 35

def specs
  file_accessors.map(&:spec).uniq
end

#to_sObject



62
63
64
# File 'lib/cocoapods/hooks/pod_representation.rb', line 62

def to_s
  root_spec.to_s
end

#versionVersion

Returns:

  • (Version)


23
24
25
# File 'lib/cocoapods/hooks/pod_representation.rb', line 23

def version
  root_spec.version
end