class NCCConfidence::Builder::Data

Attributes

attributes[R]

Public Class Methods

make(&script) click to toggle source
# File lib/nccconfidence/data_builder.rb, line 7
def make &script
        t = self.new
        t.instance_eval(&script)
        t.attributes
end
new() click to toggle source
# File lib/nccconfidence/data_builder.rb, line 14
def initialize
        @attributes = []
end

Public Instance Methods

item(value) click to toggle source
# File lib/nccconfidence/data_builder.rb, line 18
def item value
        @attributes << value
end
object(key, &value) click to toggle source
# File lib/nccconfidence/data_builder.rb, line 22
def object key, &value
        @attributes << {key => self.class.make(&value)}
end