class InputStore
Attributes
inputs[R]
Public Class Methods
new()
click to toggle source
# File lib/clingon/helpers/input_store.rb, line 3 def initialize @inputs = [] end
Public Instance Methods
fetch(value)
click to toggle source
# File lib/clingon/helpers/input_store.rb, line 14 def fetch(value) inputs.inject(nil) do |val, current| if current[:name] == value current else val end end end
store(name, value)
click to toggle source
# File lib/clingon/helpers/input_store.rb, line 7 def store(name, value) @inputs << { name: name, value: value } end