Module: Scenic::Cascade::DefinitionFinder::ClassMethods
- Defined in:
- lib/scenic/cascade/definition_finder.rb
Overview
Provides class methods to injected class
Instance Method Summary collapse
Instance Method Details
#find_definitions_of(view_name) ⇒ Object
16 17 18 |
# File 'lib/scenic/cascade/definition_finder.rb', line 16 def find_definitions_of(view_name) go(view_name, 1) end |
#find_latest_definition_of(view_name) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/scenic/cascade/definition_finder.rb', line 20 def find_latest_definition_of(view_name) latest_definition = find_definitions_of(view_name).last unless latest_definition.nil? # @type var latest_definition: Scenic::Definition return latest_definition end raise ArgumentError, "View #{view_name} does not exist" end |