Class: Pod::Component
- Inherits:
-
Object
- Object
- Pod::Component
- Defined in:
- lib/cocoapods-vemars/command/component.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#subspecs ⇒ Object
readonly
Returns the value of attribute subspecs.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(json) ⇒ Component
constructor
def initialize(name, version, subspecs = []) @name = name @version = version @subspecs = subspecs end.
- #to_s ⇒ Object
Constructor Details
#initialize(json) ⇒ Component
def initialize(name, version, subspecs = [])
@name = name
@version = version
@subspecs = subspecs
end
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/cocoapods-vemars/command/component.rb', line 13 def initialize(json) @name = json["name"] @version = json["version"] @subspecs = json["subspecs"] if @name === "RangersAPM" @subspecs = ['Crash', 'WatchDog', 'OOM', 'LAG', 'UserException', 'Monitors', 'UITrackers', 'Hybrid', 'MemoryGraph', 'Network', 'EventMonitor', 'CN'] elsif @name == "RangersAppLog" @subspecs = [ 'Core', 'Host/CN', 'OneKit', 'UITracker', 'Picker', 'Log', 'Unique' ] elsif @name == "VEAppUpdateHelper" @subspecs = [ 'VEUpdateHelper', 'VEUpdateView' ] elsif @name == "OneKit" @subspecs = [ 'BaseKit', 'Defaults', 'Database', 'MARS/Auth', 'Reachability', 'Service', 'StartUp', 'Screenshot' ] end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/cocoapods-vemars/command/component.rb', line 3 def name @name end |
#subspecs ⇒ Object (readonly)
Returns the value of attribute subspecs.
5 6 7 |
# File 'lib/cocoapods-vemars/command/component.rb', line 5 def subspecs @subspecs end |
#version ⇒ Object (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_s ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/cocoapods-vemars/command/component.rb', line 59 def to_s puts "===================================" puts "name: #{@name}\nversion: #{@version}\n" if !@subspecs.nil? && @subspecs.length > 0 puts "subspecs: #{@subspecs}\n" end end |