Module: UIC::FileBacked

Included in:
Application, Behavior, Presentation, StateMachine
Defined in:
lib/ruic/interfaces.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#docObject

Returns the value of attribute doc.



2
3
4
# File 'lib/ruic/interfaces.rb', line 2

def doc
  @doc
end

#fileObject

Returns the value of attribute file.



2
3
4
# File 'lib/ruic/interfaces.rb', line 2

def file
  @file
end

Instance Method Details

#file_found?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/ruic/interfaces.rb', line 9

def file_found?
  !@file_not_found
end

#filenameObject



6
7
8
# File 'lib/ruic/interfaces.rb', line 6

def filename
  File.basename(file)
end

#path_to(relative) ⇒ Object



3
4
5
# File 'lib/ruic/interfaces.rb', line 3

def path_to( relative )
  File.expand_path( relative.gsub('\\','/'), File.dirname(file) )
end