Class: Miko::MyBB

Inherits:
Base
  • Object
show all
Defined in:
lib/scripts/mybb.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) ⇒ MyBB

Returns a new instance of MyBB.



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

def initialize( path )
  super( path )
  
  ## Load ver 
  ver         = File.read( path )[/.*public.*version.*=.*/]
  unless ver.nil?
    @version    = ver[/([\d.]+)/]
    @acct_home  = path.gsub("inc/class_core.php", "")
    @script     = "MyBB"
  end
end