Class: PM::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-byte-panglem-beta/recorder.rb

Overview

记录Pangle SDK版本信息

Direct Known Subclasses

MInfo, SDKInfo

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version) ⇒ Info

Returns a new instance of Info.



69
70
71
72
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 69

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



67
68
69
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 67

def name
  @name
end

#versionObject

Returns the value of attribute version.



68
69
70
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 68

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object



81
82
83
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 81

def self.from_hash(hash)
  Info.new(hash["NAME"],hash["VERSION"])
end

Instance Method Details

#to_hashObject



74
75
76
77
78
79
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 74

def to_hash
  hash = {}
  hash["NAME"] = @name
  hash["VERSION"] = @version
  hash
end