class ZendeskAppsSupport::AppFile
Attributes
Public Class Methods
Source
# File lib/zendesk_apps_support/app_file.rb, line 8 def initialize(package, relative_path) @relative_path = relative_path @file = File.new(package.path_to(relative_path)) @absolute_path = File.absolute_path @file.path end
Public Instance Methods
Source
# File lib/zendesk_apps_support/app_file.rb, line 22 def =~(regex) relative_path =~ regex end
Source
# File lib/zendesk_apps_support/app_file.rb, line 18 def extension File.extname relative_path end
Source
# File lib/zendesk_apps_support/app_file.rb, line 26 def match(regex) self =~ regex end
Source
# File lib/zendesk_apps_support/app_file.rb, line 32 def method_missing(sym, *args, &block) if @file.respond_to?(sym) @file.call(sym, *args, &block) else super end end
Calls superclass method
Source
# File lib/zendesk_apps_support/app_file.rb, line 14 def read File.read @file.path end
Source
# File lib/zendesk_apps_support/app_file.rb, line 40 def respond_to_missing?(sym, include_private = false) @file.send(:respond_to_missing?, sym, include_private) || super end
Calls superclass method