~ubuntu-branches/ubuntu/wily/ctioga2/wily

« back to all changes in this revision

Viewing changes to lib/ctioga2/commands/variables.rb

  • Committer: Package Import Robot
  • Author(s): Vincent Fourmond
  • Date: 2013-07-08 20:58:17 UTC
  • mfrom: (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130708205817-cephnc6etndyxrrp
Tags: 0.4-2
* Upload to unstable
* Already conforms to newer standards

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
module CTioga2
18
18
 
19
 
  Version::register_svn_info('$Revision: 155 $', '$Date: 2010-06-21 21:41:32 +0200 (Mon, 21 Jun 2010) $')
 
19
  Version::register_svn_info('$Revision: 302 $', '$Date: 2012-01-03 14:02:43 +0100 (Tue, 03 Jan 2012) $')
20
20
 
21
21
  module Commands
22
22
 
32
32
    # There are two kind of variables
33
33
    # * immediate, defined by
34
34
    #    variable := value
35
 
    #   or
36
35
    #   These ones are evaluated for once when they are defined.
37
36
    #   They are stored in the form of a String
38
37
    # * recursively expanded variables. They are mostly like immediate
57
56
      end
58
57
 
59
58
      # Sets a the variable _name_ to _value_ (being an
60
 
      # InterpreterString or a String). If _interpreter_ is given, the
61
 
      # value is expanded at the time of the definition, (immediate
62
 
      # variable), whereas if it stays _nil_, the variable is defined
63
 
      # as a recursively defined variable.
 
59
      # InterpreterString or a String). In the former case
 
60
      # (InterpreterString), if _interpreter_ is given, the value is
 
61
      # expanded at the time of the definition, (immediate variable),
 
62
      # whereas if it stays _nil_, the variable is defined as a
 
63
      # recursively defined variable.
64
64
      def define_variable(name, value, interpreter = nil)
65
65
        if value.respond_to? :expand_to_string
66
66
          if interpreter