class Strut::Document
Attributes
commands[R]
Public Class Methods
new(commands)
click to toggle source
# File lib/strut/document.rb, line 5 def initialize(commands) @commands = commands end
Public Instance Methods
metadata_for_command_id(id)
click to toggle source
# File lib/strut/document.rb, line 9 def metadata_for_command_id(id) command = @commands.find { |c| c.id == id } command ? command.metadata : nil end