Class: Betterdocs::Dsl::Result::CollectionProperty
- Inherits:
-
Property
- Object
- Betterdocs::Dsl::Representer
- Property
- Betterdocs::Dsl::Result::CollectionProperty
- Defined in:
- lib/betterdocs/dsl/result/collection_property.rb
Instance Attribute Summary
Attributes included from Naming
Attributes inherited from Betterdocs::Dsl::Representer
Instance Method Summary collapse
Methods inherited from Property
#actual_property_name, #add_to_collector, #assign, #initialize, #sanitizer, #sub_representer?
Methods included from Naming
#below_path, #full_name, #initialize, #nesting_name, #path, #public_name
Methods included from Common
Methods inherited from Betterdocs::Dsl::Representer
#add_to_collector, #assign, #assign?, #initialize
Constructor Details
This class inherits a constructor from Betterdocs::Dsl::Result::Property
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Betterdocs::Dsl::Common
Instance Method Details
#compute_value(object) ⇒ Object
4 5 6 7 8 |
# File 'lib/betterdocs/dsl/result/collection_property.rb', line 4 def compute_value(object) object.__send__(name).to_a.compact.map do |v| represent_with.hashify(v) end end |