Parent

Included Modules

Enumerize::Value

Attributes

value[R]

Public Class Methods

new(attr, name, value=nil) click to toggle source
# File lib/enumerize/value.rb, line 9
def initialize(attr, name, value=nil)
  @attr  = attr
  @value = value.nil? ? name.to_s : value

  super(name.to_s)
end

Public Instance Methods

encode_with(coder) click to toggle source
# File lib/enumerize/value.rb, line 20
def encode_with(coder)
  coder.represent_object(self.class.superclass, @value)
end
text() click to toggle source
# File lib/enumerize/value.rb, line 16
def text
  I18n.t(i18n_keys[0], :default => i18n_keys[1..-1])
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.