class Inspector::PropertyMetadata
Attributes
property_name[R]
Public Class Methods
new(type, property_name)
click to toggle source
Calls superclass method
Inspector::Metadata::new
# File lib/inspector/property_metadata.rb, line 7 def initialize(type, property_name) @property_name = property_name super(type) end
Public Instance Methods
property_value(object)
click to toggle source
# File lib/inspector/property_metadata.rb, line 12 def property_value(object) object.__send__(:[], @property_name) rescue NoMethodError raise "metadata for #{@type.inspect} contains property metadata, however " + "#{object.inspect}[#{@property_name.inspect}] is not defined" end