Class: PluginFile
- Inherits:
-
Object
- Object
- PluginFile
- Defined in:
- lib/core/plugin_file.rb
Overview
Represents the
Instance Attribute Summary collapse
-
#absolute_path ⇒ Object
readonly
Returns the value of attribute absolute_path.
-
#plugin_type ⇒ Object
readonly
Returns the value of attribute plugin_type.
Instance Method Summary collapse
-
#initialize(absolute_path, plugin_type) ⇒ PluginFile
constructor
A new instance of PluginFile.
- #instance_name ⇒ Object
- #module_class_name ⇒ Object
- #plugin_name ⇒ Object
Constructor Details
#initialize(absolute_path, plugin_type) ⇒ PluginFile
Returns a new instance of PluginFile.
8 9 10 11 |
# File 'lib/core/plugin_file.rb', line 8 def initialize(absolute_path, plugin_type) @absolute_path = absolute_path @plugin_type = plugin_type end |
Instance Attribute Details
#absolute_path ⇒ Object (readonly)
Returns the value of attribute absolute_path.
6 7 8 |
# File 'lib/core/plugin_file.rb', line 6 def absolute_path @absolute_path end |
#plugin_type ⇒ Object (readonly)
Returns the value of attribute plugin_type.
6 7 8 |
# File 'lib/core/plugin_file.rb', line 6 def plugin_type @plugin_type end |
Instance Method Details
#instance_name ⇒ Object
13 14 15 |
# File 'lib/core/plugin_file.rb', line 13 def instance_name plugin_name.gsub(StringHelper.camelize(@plugin_type), "") end |
#module_class_name ⇒ Object
21 22 23 |
# File 'lib/core/plugin_file.rb', line 21 def module_class_name "#{plugin_name}::#{instance_name}" end |
#plugin_name ⇒ Object
17 18 19 |
# File 'lib/core/plugin_file.rb', line 17 def plugin_name StringHelper.camelize(File.basename(@absolute_path, ".rb")) end |