Class: SmartAleck::EntryCreator
- Inherits:
-
Object
- Object
- SmartAleck::EntryCreator
- Includes:
- Optionally::Required
- Defined in:
- lib/smart_aleck/entry_creator.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EntryCreator
constructor
A new instance of EntryCreator.
Constructor Details
#initialize(options = {}) ⇒ EntryCreator
Returns a new instance of EntryCreator.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/smart_aleck/entry_creator.rb', line 14 def initialize( = {}) SmartAleck.verify_configured (, :title, :content, :categories, :user) @title = [:title] @content = [:content] @categories = [:categories] @user = [:user] populate_entry categorize_entry end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
8 9 10 |
# File 'lib/smart_aleck/entry_creator.rb', line 8 def entry @entry end |
Class Method Details
.create(options = {}) ⇒ Object
10 11 12 |
# File 'lib/smart_aleck/entry_creator.rb', line 10 def self.create( = {}) new().entry end |