Class: Pod::Component

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-vemars/command/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Component

def initialize(name, version, subspecs = [])

@name = name
@version = version
@subspecs = subspecs

end



13
14
15
16
17
# File 'lib/cocoapods-vemars/command/component.rb', line 13

def initialize(json)
  @name = json["name"]
  @version = json["version"]
  @subspecs = json["subspecs"]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/cocoapods-vemars/command/component.rb', line 3

def name
  @name
end

#subspecsObject (readonly)

Returns the value of attribute subspecs.



5
6
7
# File 'lib/cocoapods-vemars/command/component.rb', line 5

def subspecs
  @subspecs
end

#versionObject (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/cocoapods-vemars/command/component.rb', line 4

def version
  @version
end

Instance Method Details

#to_sObject



19
20
21
22
23
24
25
# File 'lib/cocoapods-vemars/command/component.rb', line 19

def to_s
  puts "==================================="
  puts "name: #{@name}\nversion: #{@version}\n"
  if !@subspecs.nil? && @subspecs.length > 0
    puts "subspecs: #{@subspecs}\n"
  end
end