Class: GM::GmInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-byte-csjm/gm.rb

Overview

记录CSJM 版本信息

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version) ⇒ GmInfo

Returns a new instance of GmInfo.



56
57
58
59
# File 'lib/cocoapods-byte-csjm/gm.rb', line 56

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



54
55
56
# File 'lib/cocoapods-byte-csjm/gm.rb', line 54

def name
  @name
end

#versionObject

Returns the value of attribute version.



55
56
57
# File 'lib/cocoapods-byte-csjm/gm.rb', line 55

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object



66
67
68
# File 'lib/cocoapods-byte-csjm/gm.rb', line 66

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

Instance Method Details

#to_hashObject



60
61
62
63
64
65
# File 'lib/cocoapods-byte-csjm/gm.rb', line 60

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