Method: NSArray.read_from

Defined in:
lib/cocoa/sugarcube-files/nsarray.rb

.read_from(path_or_url) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/cocoa/sugarcube-files/nsarray.rb', line 5

def read_from(path_or_url)
  case path_or_url
  when NSURL
    self.arrayWithContentsOfURL(path_or_url)
  when NSString
    self.arrayWithContentsOfFile(path_or_url)
  else
    false
  end
end