class ZendeskAppsSupport::AppFile

Attributes

absolute_path[R]
relative_path[R]
to_s[R]

Public Class Methods

new(package, relative_path) click to toggle source
# File lib/zendesk_apps_support/app_file.rb, line 6
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

=~(regex) click to toggle source
# File lib/zendesk_apps_support/app_file.rb, line 16
def =~(regex)
  relative_path =~ regex
end
match(regex) click to toggle source
# File lib/zendesk_apps_support/app_file.rb, line 20
def match(regex)
  self =~ regex
end
method_missing(sym, *args, &block) click to toggle source
Calls superclass method
# File lib/zendesk_apps_support/app_file.rb, line 26
def method_missing(sym, *args, &block)
  if @file.respond_to?(sym)
    @file.call(sym, *args, &block)
  else
    super
  end
end
read() click to toggle source
# File lib/zendesk_apps_support/app_file.rb, line 12
def read
  File.read @file.path
end
respond_to_missing?(sym, include_private = false) click to toggle source
Calls superclass method
# File lib/zendesk_apps_support/app_file.rb, line 34
def respond_to_missing?(sym, include_private = false)
  @file.send(:respond_to_missing?, sym, include_private) || super
end