class Siren::Stack

Attributes

things[R]

Public Class Methods

load(filename) click to toggle source
# File lib/siren/stack.rb, line 9
def self.load (filename)
  new(YAML.load(File.read(filename)))
end
new() click to toggle source
# File lib/siren/stack.rb, line 13
def initialize ()
  @things = []
end

Public Instance Methods

<<(thing) click to toggle source
# File lib/siren/stack.rb, line 17
def << (thing)
  @things << thing
end
to_yaml() click to toggle source
# File lib/siren/stack.rb, line 21
def to_yaml ()
  @things.uniq.map do |thing|
    JSON.parse(thing.deep_compact.to_json).to_yaml
  end.join
end