Class: FlexCompiler::NamePath

Inherits:
Object
  • Object
show all
Defined in:
lib/flex-compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(src_dir, path) ⇒ NamePath

Returns a new instance of NamePath.



299
300
301
302
# File 'lib/flex-compiler.rb', line 299

def initialize(src_dir, path)
  @path = path
  @src_dir = src_dir
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



297
298
299
# File 'lib/flex-compiler.rb', line 297

def path
  @path
end

Instance Method Details

#nameObject



304
305
306
307
308
309
310
# File 'lib/flex-compiler.rb', line 304

def name 
  
  src = starts_with?("/", @src_dir) ? @src_dir[1, @src_dir.length] : @src_dir
  out = path.gsub( "#{src}", "")
  puts "NamePath:name: #{out}, #{path}"
  out
end

#name_pathObject



312
313
314
# File 'lib/flex-compiler.rb', line 312

def name_path
  "#{name} #{path}"
end