Class: Woody::Decorators::Submission
- Defined in:
- lib/woody/decorators/submission.rb
Instance Method Summary collapse
- #brief ⇒ Object
-
#initialize(model, config) ⇒ Submission
constructor
A new instance of Submission.
- #title ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(model, config) ⇒ Submission
Returns a new instance of Submission.
8 9 10 11 |
# File 'lib/woody/decorators/submission.rb', line 8 def initialize(model, config) @config = config super(model) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Woody::Decorators::Base
Instance Method Details
#brief ⇒ Object
13 14 15 16 17 18 |
# File 'lib/woody/decorators/submission.rb', line 13 def brief @brief ||= Woody::Decorators::Brief.new( Wes::Data::API::Brief.find(:id, @model.brief_id), @config ) end |
#title ⇒ Object
20 21 22 23 24 |
# File 'lib/woody/decorators/submission.rb', line 20 def title format( '%s - %s', brief.brand.name, brief.title ) end |