Class: PM::AdnNote

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

Instance Attribute Summary collapse

Attributes inherited from Note

#auto_load, #auto_update, #load_detect

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Note

#get_update

Constructor Details

#initialize(adn_name, auto_load = false, auto_update = PM::BuildConfig.update_value_non, load_detect = false) ⇒ AdnNote

Returns a new instance of AdnNote.



155
156
157
158
159
160
161
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 155

def initialize(adn_name, auto_load = false , auto_update = PM::BuildConfig.update_value_non, load_detect = false)
  @adn_name = adn_name
  @adapter_name = PM::MapRelations.get_adapter adn_name
  @auto_load = auto_load
  @auto_update = get_update auto_update
  @load_detect = load_detect
end

Instance Attribute Details

#adapter_expected_versionObject

期望加载的版本号



153
154
155
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 153

def adapter_expected_version
  @adapter_expected_version
end

#adapter_nameObject

Returns the value of attribute adapter_name.



151
152
153
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 151

def adapter_name
  @adapter_name
end

#adapter_original_versionObject

加载的版本号



152
153
154
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 152

def adapter_original_version
  @adapter_original_version
end

#adn_nameObject

Returns the value of attribute adn_name.



149
150
151
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 149

def adn_name
  @adn_name
end

#adn_versionObject

Returns the value of attribute adn_version.



150
151
152
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 150

def adn_version
  @adn_version
end

Class Method Details

.from_hash(hash) ⇒ Object



176
177
178
179
180
181
182
183
184
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 176

def self.from_hash(hash)
  note =  AdnNote.new(hash["ADN_NAME"],hash["AUTO_LOAD"],hash["AUTO_UPDATE"],hash["LOAD_DETECT"])
  note.adn_name = hash["ADN_NAME"]
  note.adn_version = hash["ADN_VERSION"]
  note.adapter_name = hash["ADAPTER_NAME"]
  note.adapter_original_version = hash["ADAPTER_ORIGINAL_VERSION"]
  note.adapter_expected_version = hash["ADAPTER_EXPECTED_VERSION"]
  note
end

Instance Method Details

#to_hashObject



163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 163

def to_hash
  hash = {}
  hash["ADN_NAME"] = @adn_name
  hash["ADN_VERSION"] = @adn_version
  hash["ADAPTER_NAME"] = @adapter_name
  hash["ADAPTER_ORIGINAL_VERSION"] = @adapter_original_version
  hash["ADAPTER_EXPECTED_VERSION"] = @adapter_expected_version
  hash["AUTO_LOAD"] = @auto_load
  hash["AUTO_UPDATE"] = @auto_update
  hash["LOAD_DETECT"] = @load_detect
  hash
end