Module: TurboStreamer::DependencyTrackerMethods

Defined in:
lib/turbostreamer/dependency_tracker.rb

Constant Summary collapse

DIRECT_RENDERS =

Matches:

json.partial! "messages/message"
json.partial!('messages/message')
/
  \w+\.partial!     # json.partial!
  \(?\s*            # optional parenthesis
  (['"])([^'"]+)\1  # quoted value
/x
INDIRECT_RENDERS =

Matches:

json.partial! partial: "comments/comment"
json.comments @post.comments, partial: "comments/comment", as: :comment
json.array! @posts, partial: "posts/post", as: :post
= render partial: "account"
/
  (?::partial\s*=>|partial:)  # partial: or :partial =>
  \s*                         # optional whitespace
  (['"])([^'"]+)\1            # quoted value
/x

Instance Method Summary collapse

Instance Method Details

#dependenciesObject



40
41
42
# File 'lib/turbostreamer/dependency_tracker.rb', line 40

def dependencies
  direct_dependencies + indirect_dependencies + explicit_dependencies
end