Class: GM::GmInfo
- Inherits:
-
Object
- Object
- GM::GmInfo
- Defined in:
- lib/cocoapods-byte-csjm/gm.rb
Overview
记录CSJM 版本信息
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, version) ⇒ GmInfo
constructor
A new instance of GmInfo.
- #to_hash ⇒ Object
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
#name ⇒ Object
Returns the value of attribute name.
54 55 56 |
# File 'lib/cocoapods-byte-csjm/gm.rb', line 54 def name @name end |
#version ⇒ Object
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_hash ⇒ Object
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 |