Class: Miko::Joomla

Inherits:
Base
  • Object
show all
Defined in:
lib/scripts/joomla.rb

Instance Attribute Summary

Attributes inherited from Base

#acct_home, #path, #script, #version

Instance Method Summary collapse

Methods inherited from Base

#showVersion

Constructor Details

#initialize(path) ⇒ Joomla

Returns a new instance of Joomla.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/scripts/joomla.rb', line 5

def initialize( path )
  super( path )
  
  ## Load ver 
  ver         = File.read( path )[/.*RELEASE.*/][/([\d.]+)/]
  dev         = File.read( path )[/DEV_LEVEL.*/][/\d+/]

  @version     = "#{ver}.#{dev}"
  @acct_home   = path.split("libraries")[0]
  @script      = "Joomla"
end

Instance Method Details

#returnversion(path) ⇒ Object



17
18
19
# File 'lib/scripts/joomla.rb', line 17

def returnversion(path)
  File.read( path )[/.*wp_version.*=.*$/][/([\d.]+)/]
end