Class: Arbitrium::FileCreator
- Inherits:
-
Object
- Object
- Arbitrium::FileCreator
- Defined in:
- lib/arbitrium/file_creator.rb
Instance Attribute Summary collapse
-
#file_with_path ⇒ Object
readonly
Returns the value of attribute file_with_path.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#module_array ⇒ Object
readonly
Returns the value of attribute module_array.
-
#pwd ⇒ Object
readonly
Returns the value of attribute pwd.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ FileCreator
constructor
A new instance of FileCreator.
- #perform ⇒ Object
Constructor Details
#initialize(options) ⇒ FileCreator
Returns a new instance of FileCreator.
9 10 11 12 13 14 |
# File 'lib/arbitrium/file_creator.rb', line 9 def initialize() @file_with_path = [:file] @method_name = [:method_name] @pwd = [:pwd] @module_array = [:module_array] end |
Instance Attribute Details
#file_with_path ⇒ Object (readonly)
Returns the value of attribute file_with_path.
3 4 5 |
# File 'lib/arbitrium/file_creator.rb', line 3 def file_with_path @file_with_path end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
3 4 5 |
# File 'lib/arbitrium/file_creator.rb', line 3 def method_name @method_name end |
#module_array ⇒ Object (readonly)
Returns the value of attribute module_array.
3 4 5 |
# File 'lib/arbitrium/file_creator.rb', line 3 def module_array @module_array end |
#pwd ⇒ Object (readonly)
Returns the value of attribute pwd.
3 4 5 |
# File 'lib/arbitrium/file_creator.rb', line 3 def pwd @pwd end |
Class Method Details
.perform(options) ⇒ Object
5 6 7 |
# File 'lib/arbitrium/file_creator.rb', line 5 def self.perform() new().perform end |
Instance Method Details
#perform ⇒ Object
16 17 18 |
# File 'lib/arbitrium/file_creator.rb', line 16 def perform puts create_file ? "Successfully created file in #{full_path_with_file}" : "Failed to create file!" end |