Class: AnnotateYaml::FileHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/annotate_yaml/annotate_yaml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_name) ⇒ FileHandler

Returns a new instance of FileHandler.



35
36
37
38
# File 'lib/annotate_yaml/annotate_yaml.rb', line 35

def initialize(file_name)
  @file_name = file_name
  @result = ""
end

Instance Attribute Details

#file_nameObject (readonly)

Returns the value of attribute file_name.



33
34
35
# File 'lib/annotate_yaml/annotate_yaml.rb', line 33

def file_name
  @file_name
end

#resultObject (readonly)

Returns the value of attribute result.



33
34
35
# File 'lib/annotate_yaml/annotate_yaml.rb', line 33

def result
  @result
end

Instance Method Details

#callObject



40
41
42
43
# File 'lib/annotate_yaml/annotate_yaml.rb', line 40

def call
  create_annotated_text
  rewrite_file
end