Class: InspecTools::GenerateMap
- Defined in:
- lib/inspec_tools/generate_map.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #generate_example(file) ⇒ Object
-
#initialize(text = nil) ⇒ GenerateMap
constructor
A new instance of GenerateMap.
Constructor Details
#initialize(text = nil) ⇒ GenerateMap
Returns a new instance of GenerateMap.
5 6 7 |
# File 'lib/inspec_tools/generate_map.rb', line 5 def initialize(text = nil) @text = text.nil? ? default_text : text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/inspec_tools/generate_map.rb', line 3 def text @text end |
Instance Method Details
#generate_example(file) ⇒ Object
9 10 11 |
# File 'lib/inspec_tools/generate_map.rb', line 9 def generate_example(file) File.write(file, @text) end |