class Fig::Statement::Resource

Specifies a file (possibly via a URL) that is part of the current package.

Differs from an Archive in that the contents will not be extracted.

Public Class Methods

new(line_column, source_description, location, glob_if_not_url) click to toggle source
Calls superclass method Fig::Statement::new
# File lib/fig/statement/resource.rb, line 16
def initialize(line_column, source_description, location, glob_if_not_url)
  super(line_column, source_description)

  @location        = location
  @glob_if_not_url = glob_if_not_url
end

Public Instance Methods

asset_name() click to toggle source
# File lib/fig/statement/resource.rb, line 27
def asset_name()
  if Fig::URL.is_url?(location())
    return standard_asset_name()
  end

  # This resource will end up being bundled with others and will not live in
  # the package by itself.
  return nil
end
deparse_as_version(deparser) click to toggle source
# File lib/fig/statement/resource.rb, line 37
def deparse_as_version(deparser)
  return deparser.resource(self)
end
statement_type() click to toggle source
# File lib/fig/statement/resource.rb, line 23
def statement_type()
  return 'resource'
end