Class: Miko::Wordpress
Instance Attribute Summary
Attributes inherited from Base
#acct_home, #path, #script, #version
Instance Method Summary collapse
-
#initialize(path) ⇒ Wordpress
constructor
A new instance of Wordpress.
- #returnversion(path) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(path) ⇒ Wordpress
Returns a new instance of Wordpress.
5 6 7 8 9 10 11 |
# File 'lib/scripts/wordpress.rb', line 5 def initialize( path ) super( path ) @version = returnversion( @path ) @acct_home = path.gsub("wp-includes/version.php", "") @script = "Wordpress" end |
Instance Method Details
#returnversion(path) ⇒ Object
13 14 15 |
# File 'lib/scripts/wordpress.rb', line 13 def returnversion(path) File.read( path )[/.*wp_version.*=.*$/][/([\d.]+)/] end |