Class: Miko::Drupal
Instance Attribute Summary
Attributes inherited from Base
#acct_home, #path, #script, #version
Instance Method Summary collapse
-
#initialize(path) ⇒ Drupal
constructor
A new instance of Drupal.
Methods inherited from Base
Constructor Details
#initialize(path) ⇒ Drupal
Returns a new instance of Drupal.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/scripts/drupal.rb', line 5 def initialize( path ) super( path ) versions = [] ## Verify that this is indeed Drupal's File.open( path ).each_line {|x| versions << x if x =~ /Drupal.*/ } unless versions.empty? @version = versions[0][/([\d.]+)/] @script = "Drupal" @acct_home = path.gsub("CHANGELOG.txt", "") end end |