Module: Baltix::Loader::Yaml
- Included in:
- Source::Gem
- Defined in:
- lib/baltix/loader/yaml.rb
Overview
yaml gemspec generator based example: “lemon” gem
Instance Method Summary collapse
Instance Method Details
#yaml(file) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/baltix/loader/yaml.rb', line 5 def yaml file spec = Gem::Specification.from_yaml(IO.read(file)) file = Tempfile.new(spec.name) file.puts(spec.to_ruby) file.close res = app_file(file.path) file.unlink res rescue => e nil end |