Sha256: be0ec2278d2f32e1fc18147b6e5967b1b43f39301d3789926705b34a83d589a6

Contents?: true

Size: 646 Bytes

Versions: 1

Compression:

Stored size: 646 Bytes

Contents

class UIC::Effect
	include UIC::FileBacked
	attr_reader :lua
	def initialize( lua_path )
		self.file = lua_path
		load_from_file if file_found?
	end
	def load_from_file
		@lua = File.read(file,encoding:'utf-8')
	end

	def errors?
		!errors.empty?
	end

	def errors
		file_found? ? [] : ["File not found: '#{file}'"]
	end

end

class UIC::Application::Effect < UIC::Effect
	include UIC::ElementBacked
	# @!parse extend UIC::ElementBacked::ClassMethods
	xmlattribute :id
	xmlattribute :src
	def initialize(application,el)
		self.owner = application
		self.el    = el
		super( application.absolute_path(src) )
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
RUIC-0.6.1 lib/ruic/effect.rb