DeclaredProperty

Contains methods related to the management

Constants

  • ILLEGAL_PROPS

Methods

#default_value

def default_value
  options[:default]
end

#initialize

def initialize(name, options = {})
  fail IllegalPropertyError, "#{name} is an illegal property" if ILLEGAL_PROPS.include?(name.to_s)
  @name = @name_sym = name
  @name_string = name.to_s
  @options = options
end
#magic_typecaster

Returns the value of attribute magic_typecaster

def magic_typecaster
  @magic_typecaster
end
#name

Returns the value of attribute name

def name
  @name
end
#name_string

Returns the value of attribute name_string

def name_string
  @name_string
end
#name_sym

Returns the value of attribute name_sym

def name_sym
  @name_sym
end
#options

Returns the value of attribute options

def options
  @options
end

#register

def register
  register_magic_properties
end

#type

def type
  options[:type]
end

#typecaster

def typecaster
  options[:typecaster]
end