Class: Rake::Delphi::ProjectVersionInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/delphi/projectinfo.rb

Direct Known Subclasses

BDSVersionInfo

Instance Method Summary collapse

Constructor Details

#initialize(task) ⇒ ProjectVersionInfo

Returns a new instance of ProjectVersionInfo.



9
10
11
12
13
# File 'lib/rake/delphi/projectinfo.rb', line 9

def initialize(task)
    @info = Hash.new
    @file = task.systempath.pathmap('%X.' + self._ext)
    do_getcontent
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



27
28
29
# File 'lib/rake/delphi/projectinfo.rb', line 27

def method_missing(name, *args, &block)
    @info[name]
end

Instance Method Details

#[](key) ⇒ Object



23
24
25
# File 'lib/rake/delphi/projectinfo.rb', line 23

def [](key)
    @info[key.to_sym]
end

#_extObject



19
20
21
# File 'lib/rake/delphi/projectinfo.rb', line 19

def _ext
    ''
end

#do_getcontentObject



15
16
17
# File 'lib/rake/delphi/projectinfo.rb', line 15

def do_getcontent
    @content = nil
end