Class: PM::GlobalNote

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(auto_load = true, auto_update = PM::BuildConfig.update_value_last_version, load_detect = true, auto_load_whitelist = {}, is_release = false) ⇒ GlobalNote

Returns a new instance of GlobalNote.



121
122
123
124
125
126
127
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 121

def initialize(auto_load = true , auto_update = PM::BuildConfig.update_value_last_version, load_detect = true, auto_load_whitelist = {},is_release = false)
  @auto_load = auto_load
  @auto_update = get_update auto_update
  @load_detect = load_detect
  @auto_load_whitelist = auto_load_whitelist
  @is_release = is_release
end

Instance Attribute Details

#auto_load_whitelistObject

Returns the value of attribute auto_load_whitelist.



118
119
120
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 118

def auto_load_whitelist
  @auto_load_whitelist
end

#is_releaseObject (readonly)

Returns the value of attribute is_release.



120
121
122
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 120

def is_release
  @is_release
end

#use_service_localObject

Returns the value of attribute use_service_local.



119
120
121
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 119

def use_service_local
  @use_service_local
end

Class Method Details

.from_hash(hash) ⇒ Object



138
139
140
141
142
143
144
145
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 138

def self.from_hash(hash)
  global_note =  GlobalNote.new()
  global_note.auto_load = hash["AUTO_LOAD"] if hash.has_key?("AUTO_LOAD")
  global_note.auto_update = hash["AUTO_UPDATE"] if hash.has_key?("AUTO_UPDATE")
  global_note.load_detect = hash["LOAD_DETECT"] if hash.has_key?("LOAD_DETECT")
  global_note.auto_load_whitelist = hash["AUTO_LOAD_WHITELIST"] if hash.has_key?("AUTO_LOAD_WHITELIST")
  global_note
end

Instance Method Details

#to_hashObject



129
130
131
132
133
134
135
136
# File 'lib/cocoapods-byte-panglem-beta/recorder.rb', line 129

def to_hash
  hash = {}
  hash["AUTO_LOAD"] = @auto_load
  hash["AUTO_UPDATE"] = @auto_update
  hash["LOAD_DETECT"] = @load_detect
  hash["AUTO_LOAD_WHITELIST"] = @auto_load_whitelist
  hash
end