Class: Styoe::DotFile

Inherits:
Struct
  • Object
show all
Defined in:
lib/styoe/dot_file_manager.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#contentsObject

Returns the value of attribute contents

Returns:

  • (Object)

    the current value of contents



4
5
6
# File 'lib/styoe/dot_file_manager.rb', line 4

def contents
  @contents
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



4
5
6
# File 'lib/styoe/dot_file_manager.rb', line 4

def path
  @path
end

Class Method Details

.read_from_path(path) ⇒ Object



5
6
7
8
# File 'lib/styoe/dot_file_manager.rb', line 5

def self.read_from_path(path)
  contents = File.read(path)
  self.new(path, contents)
end