Module: Her::Model::Introspection
- Extended by:
- ActiveSupport::Concern
- Included in:
- Her::Model
- Defined in:
- lib/castle-her/model/introspection.rb
Instance Method Summary collapse
-
#inspect ⇒ Object
Inspect an element, returns it for introspection.
Instance Method Details
#inspect ⇒ Object
Inspect an element, returns it for introspection.
14 15 16 17 18 19 20 21 22 |
# File 'lib/castle-her/model/introspection.rb', line 14 def inspect resource_path = begin request_path rescue Her::Errors::PathError => e "<unknown path, missing `#{e.missing_parameter}`>" end "#<#{self.class}(#{resource_path}) #{attributes.keys.map { |k| "#{k}=#{attribute_for_inspect(send(k))}" }.join(" ")}>" end |