Sha256: a3325a981c8268115d5a3d857615c9ee7bb4494ddb1592e6f87f954c5552e71e

Contents?: true

Size: 594 Bytes

Versions: 11

Compression:

Stored size: 594 Bytes

Contents

class UIC::Behavior
	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::Behavior < UIC::Behavior
	include UIC::ElementBacked
	xmlattribute :id
	xmlattribute :src
	def initialize(application,el)
		self.owner = application
		self.el    = el
		super( application.path_to(src) )
	end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
RUIC-0.4.2 lib/ruic/behaviors.rb
RUIC-0.4.1 lib/ruic/behaviors.rb
RUIC-0.4.0 lib/ruic/behaviors.rb
RUIC-0.3.0 lib/ruic/behaviors.rb
RUIC-0.2.6 lib/ruic/behaviors.rb
RUIC-0.2.5 lib/ruic/behaviors.rb
RUIC-0.2.3 lib/ruic/behaviors.rb
RUIC-0.2.2 lib/ruic/behaviors.rb
RUIC-0.2.0 lib/ruic/behaviors.rb
RUIC-0.1.0 lib/ruic/behaviors.rb
RUIC-0.0.1 lib/ruic/behaviors.rb