class Parxer::Attribute

Attributes

formatter[R]
id[R]
name[R]
validators[R]

Public Class Methods

new(id, name: nil) click to toggle source
# File lib/parxer/values/attribute.rb, line 9
def initialize(id, name: nil)
  @id = id.to_sym
  @name = name
  @validators = Parxer::Validators.new
end

Public Instance Methods

add_formatter(formatter_name, config = {}, &block) click to toggle source
# File lib/parxer/values/attribute.rb, line 15
def add_formatter(formatter_name, config = {}, &block)
  @formatter = Parxer::FormatterBuilder.build(formatter_name, config, &block)
end