class Immutabler::DSL::EnumAttributesBuilder

Public Class Methods

new(attributes, prefix, &block) click to toggle source
# File lib/immutabler/dsl/enum_attributes_builder.rb, line 6
def initialize(attributes, prefix, &block)
  @attributes = attributes
  @prefix = prefix
  instance_eval(&block)
end

Public Instance Methods

attr(name) click to toggle source
# File lib/immutabler/dsl/enum_attributes_builder.rb, line 12
def attr(name)
  @attributes << EnumAttribute.new("#{@prefix}#{name}")
end