Class: AppDrone::Flair
- Defined in:
- lib/app_drone/drones/flair/flair.rb
Instance Attribute Summary collapse
-
#flairs ⇒ Object
Returns the value of attribute flairs.
Attributes inherited from Drone
Instance Method Summary collapse
Methods inherited from Drone
#>>, #^, #align, categories, category, dependants, dependencies, depends_on, desc, #do!, #do_finally!, drones, #flair!, generator_method, human_name, #initialize, #method_missing, #notify!, owns_generator_method, #pair?, pairs, pairs_with, param, #param, param_named, param_with, params, precursors, #render, run_after, to_sym
Constructor Details
This class inherits a constructor from AppDrone::Drone
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AppDrone::Drone
Instance Attribute Details
#flairs ⇒ Object
Returns the value of attribute flairs.
7 8 9 |
# File 'lib/app_drone/drones/flair/flair.rb', line 7 def flairs @flairs end |
Instance Method Details
#add(klass) ⇒ Object
13 14 15 |
# File 'lib/app_drone/drones/flair/flair.rb', line 13 def add(klass) flairs << klass.class.to_sym end |
#execute ⇒ Object
17 18 19 |
# File 'lib/app_drone/drones/flair/flair.rb', line 17 def execute do! :flair_page end |
#flair_for(drone_name) ⇒ Object
21 22 23 24 |
# File 'lib/app_drone/drones/flair/flair.rb', line 21 def flair_for(drone_name) drone = send(drone_name) return drone.render 'flair.html.slim', skip_stamp: true end |
#setup ⇒ Object
9 10 11 |
# File 'lib/app_drone/drones/flair/flair.rb', line 9 def setup self.flairs = [] end |