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.



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

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object



89
90
91
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 89

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

Instance Method Details

#to_hashObject



82
83
84
85
86
87
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 82

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