Class: YamlMaster::EmbeddedMethods
- Inherits:
-
Object
- Object
- YamlMaster::EmbeddedMethods
- Defined in:
- lib/yaml_master.rb
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(yaml_master) ⇒ EmbeddedMethods
constructor
A new instance of EmbeddedMethods.
- #master_path ⇒ Object
- #properties ⇒ Object
- #read_file_if_exist(path) ⇒ Object
- #user_home ⇒ Object
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_binding ⇒ Object
114 115 116 |
# File 'lib/yaml_master.rb', line 114 def get_binding binding end |
#master_path ⇒ Object
97 98 99 |
# File 'lib/yaml_master.rb', line 97 def master_path Pathname(@yaml_master.master_path) end |
#properties ⇒ Object
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_home ⇒ Object
105 106 107 |
# File 'lib/yaml_master.rb', line 105 def user_home Pathname(ENV["HOME"]) end |