Module: Morpheus::Mixins::Introspection
- Included in:
- Base
- Defined in:
- lib/morpheus/mixins/introspection.rb
Instance Method Summary collapse
- #destroyed? ⇒ Boolean
- #new_record? ⇒ Boolean
- #persisted? ⇒ Boolean
- #respond_to?(method, include_private = false) ⇒ Boolean
Instance Method Details
#destroyed? ⇒ Boolean
13 14 15 |
# File 'lib/morpheus/mixins/introspection.rb', line 13 def destroyed? false end |
#new_record? ⇒ Boolean
9 10 11 |
# File 'lib/morpheus/mixins/introspection.rb', line 9 def new_record? !persisted? end |
#persisted? ⇒ Boolean
5 6 7 |
# File 'lib/morpheus/mixins/introspection.rb', line 5 def persisted? !id.nil? end |
#respond_to?(method, include_private = false) ⇒ Boolean
17 18 19 |
# File 'lib/morpheus/mixins/introspection.rb', line 17 def respond_to?(method, include_private = false) attributes.include?(method) ? true : super end |