Class: Instadoc::Config
- Inherits:
-
Object
- Object
- Instadoc::Config
- Defined in:
- lib/instadoc/config.rb
Instance Attribute Summary collapse
-
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
-
#input_path ⇒ Object
Returns the value of attribute input_path.
-
#output_path ⇒ Object
Returns the value of attribute output_path.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
- #hyperlink_for(file_name) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #open_new_file(pathname) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
11 12 13 |
# File 'lib/instadoc/config.rb', line 11 def initialize() @hyperlink = "PLACEHOLDER" end |
Instance Attribute Details
#hyperlink ⇒ Object
Returns the value of attribute hyperlink.
8 9 10 |
# File 'lib/instadoc/config.rb', line 8 def hyperlink @hyperlink end |
#input_path ⇒ Object
Returns the value of attribute input_path.
7 8 9 |
# File 'lib/instadoc/config.rb', line 7 def input_path @input_path end |
#output_path ⇒ Object
Returns the value of attribute output_path.
6 7 8 |
# File 'lib/instadoc/config.rb', line 6 def output_path @output_path end |
#verbose ⇒ Object
Returns the value of attribute verbose.
9 10 11 |
# File 'lib/instadoc/config.rb', line 9 def verbose @verbose end |
Instance Method Details
#hyperlink_for(file_name) ⇒ Object
15 16 17 |
# File 'lib/instadoc/config.rb', line 15 def hyperlink_for(file_name) @hyperlink.gsub("PLACEHOLDER",file_name) end |
#open_new_file(pathname) ⇒ Object
19 20 21 |
# File 'lib/instadoc/config.rb', line 19 def open_new_file(pathname) File.new(pathname.realpath, 'w') end |