Class: Mmi::Source::Url

Inherits:
Object
  • Object
show all
Includes:
PropertyAttributes
Defined in:
lib/mmi/source/url.rb

Instance Method Summary collapse

Methods included from PropertyAttributes

#[], #initialize, #parse!, #parsed_property_store, prepended, #to_h, #update_properties!, #validate_constraints!

Instance Method Details

#display_nameObject



25
26
27
# File 'lib/mmi/source/url.rb', line 25

def display_name
	url
end

#download_uriObject



15
16
17
# File 'lib/mmi/source/url.rb', line 15

def download_uri
	@download_uri ||= URI.parse(url)
end

#install(install_record) ⇒ Object



19
20
21
22
23
# File 'lib/mmi/source/url.rb', line 19

def install(install_record)
	filepath = File.join(install_dir, self.filename || File.basename(download_uri.path))
	
	install_record.add(url, filepath, content_hash: nil)
end