class Pod::Image
Attributes
dir[RW]
fuzzy_name[RW]
name[RW]
Public Class Methods
new(dir, name)
click to toggle source
# File lib/cocoapods-dongjia/command/strip.rb, line 10 def initialize(dir, name) @dir = dir if name.end_with?('@2x') || name.end_with?('@3x') name = name[0, name.length-3] end @name = name # 只处理最后一段为数字,或分了三段及以上的命名形式 comps = name.split('_') last = comps.last if last.to_i > 0 || last.start_with?('0') || comps.count >= 3 @fuzzy_name = name[0, name.length - last.length] else @fuzzy_name = '' end end
Public Instance Methods
eql?(other)
click to toggle source
# File lib/cocoapods-dongjia/command/strip.rb, line 27 def eql?(other) @dir == other.dir && @name == other.name end
fullpath()
click to toggle source
# File lib/cocoapods-dongjia/command/strip.rb, line 35 def fullpath File.join(@dir, @name) end
hash()
click to toggle source
# File lib/cocoapods-dongjia/command/strip.rb, line 31 def hash [@dir, @name].hash end