Class: FlexCompiler::NamePath
- Inherits:
-
Object
- Object
- FlexCompiler::NamePath
- Defined in:
- lib/flex-compiler.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(src_dir, path) ⇒ NamePath
constructor
A new instance of NamePath.
- #name ⇒ Object
- #name_path ⇒ Object
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
#path ⇒ Object (readonly)
Returns the value of attribute path.
297 298 299 |
# File 'lib/flex-compiler.rb', line 297 def path @path end |
Instance Method Details
#name ⇒ Object
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_path ⇒ Object
312 313 314 |
# File 'lib/flex-compiler.rb', line 312 def name_path "#{name} #{path}" end |