class Resources::StringResource
Attributes
strings[R]
Public Instance Methods
method_name(string)
click to toggle source
# File lib/robjc/resources/string_resource.rb, line 12 def method_name(string) components = string.split('_') string = components.first.downcase if components.length == 1 string else components.each_with_index do |s, i| next if i == 0 string += s.capitalize end end string end
Private Instance Methods
read_strings_file()
click to toggle source
# File lib/robjc/resources/string_resource.rb, line 28 def read_strings_file keys = [] Tempfile.create('strings.plist') do |f| `plutil -convert xml1 "#{path}" -o "#{f.path}"` keys = Plist::parse_xml(f.path).keys end keys.uniq end