Class: YamlMaster::EmbeddedMethods

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

Instance Method Summary collapse

Constructor Details

#initialize(yaml_master) ⇒ EmbeddedMethods

Returns a new instance of EmbeddedMethods.



93
94
95
# File 'lib/yaml_master.rb', line 93

def initialize(yaml_master)
  @yaml_master = yaml_master
end

Instance Method Details

#get_bindingObject



114
115
116
# File 'lib/yaml_master.rb', line 114

def get_binding
  binding
end

#master_pathObject



97
98
99
# File 'lib/yaml_master.rb', line 97

def master_path
  Pathname(@yaml_master.master_path)
end

#propertiesObject



101
102
103
# File 'lib/yaml_master.rb', line 101

def properties
  @yaml_master.properties
end

#read_file_if_exist(path) ⇒ Object



109
110
111
112
# File 'lib/yaml_master.rb', line 109

def read_file_if_exist(path)
  return nil unless File.exist?(path)
  File.read(path)
end

#user_homeObject



105
106
107
# File 'lib/yaml_master.rb', line 105

def user_home
  Pathname(ENV["HOME"])
end