Module: Webservice
- Defined in:
- lib/webservice.rb,
lib/webservice/base.rb,
lib/webservice/version.rb
Defined Under Namespace
Classes: Base
Constant Summary collapse
- MAJOR =
todo: namespace inside version or something - why? why not??
0- MINOR =
3- PATCH =
1- VERSION =
[MAJOR,MINOR,PATCH].join('.')
Class Method Summary collapse
Class Method Details
.banner ⇒ Object
13 14 15 |
# File 'lib/webservice/version.rb', line 13 def self. "webservice/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]" end |
.load(code) ⇒ Object
31 32 33 34 35 |
# File 'lib/webservice.rb', line 31 def self.load( code ) app_class = Class.new( Base ) ## create new app_class or just use Base itself - why? why not? app_class.class_eval( code ) ## note: use class_eval (NOT instance_eval) app_class end |
.load_file(path) ⇒ Object
26 27 28 29 |
# File 'lib/webservice.rb', line 26 def self.load_file( path ) code = File.open( path, 'r:bom|utf-8' ).read self.load( code ) end |
.root ⇒ Object
17 18 19 |
# File 'lib/webservice/version.rb', line 17 def self.root "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}" end |
.version ⇒ Object
9 10 11 |
# File 'lib/webservice/version.rb', line 9 def self.version VERSION end |