Class: Ploy::YamlReader
- Inherits:
-
Object
- Object
- Ploy::YamlReader
- Defined in:
- lib/ploy/yamlreader.rb
Instance Method Summary collapse
Instance Method Details
#from_file(path) ⇒ Object
5 6 7 |
# File 'lib/ploy/yamlreader.rb', line 5 def from_file(path) YAML.load(File.read(path)) end |
#from_http(url) ⇒ Object
13 14 15 16 |
# File 'lib/ploy/yamlreader.rb', line 13 def from_http(url) txt = Net::HTTP.get(URI(url)) YAML.load(txt) end |