Class: SiSU_Param::Parameters::MdDefault

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/dp.rb

Instance Method Summary collapse

Instance Method Details

#allObject



152
153
154
155
156
157
158
159
160
161
# File 'lib/sisu/dp.rb', line 152

def all
  s=nil
  if @author
    #puts assignment(@author)
    s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
    ? ("Copyright (C) #{$1} #{@author}")
    : ('Copyright (C)' + @author))                     #matches years 1400 through 21\d\d
  end
  s
end

#assignment(author) ⇒ Object



147
148
149
150
151
# File 'lib/sisu/dp.rb', line 147

def assignment(author)
  'copyright not explicitly stated, ' \
  + 'program "assigning" copyright to author: ' \
  + author
end


175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/sisu/dp.rb', line 175

def copyright
  def all
    s=nil
    if @author
      s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
      ? ("Copyright (C) #{$1} #{@author}")
      : ('Copyright (C)' + @author))                     #matches years 1400 through 21\d\d
    end
    s
  end
  def text
    all
  end
  self
end


162
163
164
165
166
167
168
169
170
171
# File 'lib/sisu/dp.rb', line 162

def copyright_and_license
  s=nil
  if @author
    #puts assignment(@author)
    s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
    ? ("Copyright (C) #{$1} #{@author}")
    : ('Copyright (C)' + @author))                     #matches years 1400 through 21\d\d
  end
  s
end

#rights(author, date) ⇒ Object



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/sisu/dp.rb', line 145

def rights(author,date)
  @author,@date=author,date
  def assignment(author)
    'copyright not explicitly stated, ' \
    + 'program "assigning" copyright to author: ' \
    + author
  end
  def all
    s=nil
    if @author
      #puts assignment(@author)
      s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
      ? ("Copyright (C) #{$1} #{@author}")
      : ('Copyright (C)' + @author))                     #matches years 1400 through 21\d\d
    end
    s
  end
  def copyright_and_license
    s=nil
    if @author
      #puts assignment(@author)
      s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
      ? ("Copyright (C) #{$1} #{@author}")
      : ('Copyright (C)' + @author))                     #matches years 1400 through 21\d\d
    end
    s
  end
  def text
    all
  end
  def copyright
    def all
      s=nil
      if @author
        s ||=((@date =~/((?:1[4-9]|2[01])\d{2})/ ) \
        ? ("Copyright (C) #{$1} #{@author}")
        : ('Copyright (C)' + @author))                     #matches years 1400 through 21\d\d
      end
      s
    end
    def text
      all
    end
    self
  end
  self
end

#textObject



172
173
174
# File 'lib/sisu/dp.rb', line 172

def text
  all
end