Class: Miko::Joomla
Instance Attribute Summary
Attributes inherited from Base
#acct_home, #path, #script, #version
Instance Method Summary collapse
-
#initialize(path) ⇒ Joomla
constructor
A new instance of Joomla.
- #returnversion(path) ⇒ Object
Methods inherited from Base
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 |