Class: CocoapodsCatalystSupport::PodDependency

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-catalyst-support/pod_dependency.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 4

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 5

def type
  @type
end

Class Method Details

.newFramework(name) ⇒ Object



22
23
24
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 22

def self.newFramework name
  return PodDependency.new(name, :framework)
end

.newLibrary(name) ⇒ Object



26
27
28
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 26

def self.newLibrary name
  return PodDependency.new(name, :library)
end

.newWeakFramework(name) ⇒ Object



18
19
20
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 18

def self.newWeakFramework name
  return PodDependency.new(name, :weak_framework)
end

Instance Method Details

#==(other) ⇒ Object



30
31
32
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 30

def ==(other)
  (name == other.name) && (type == other.type)
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 34

def eql?(other)
  self == other
end


7
8
9
10
11
12
13
14
15
16
# File 'lib/cocoapods-catalyst-support/pod_dependency.rb', line 7

def link
  case type
  when :weak_framework
    return "-weak_framework \"#{name}\""
  when :library
    return "-l\"#{name}\""
  else
    return "-framework \"#{name}\"" 
  end
end