Class: Boxspring::Story
- Inherits:
-
Base
- Object
- ActiveHash::Base
- Base
- Boxspring::Story
show all
- Includes:
- Taggable
- Defined in:
- lib/boxspring/story.rb
Instance Method Summary
collapse
Methods included from Taggable
#tags
Methods inherited from Base
#initialize
Instance Method Details
#content ⇒ Object
40
41
42
43
44
45
46
47
48
|
# File 'lib/boxspring/story.rb', line 40
def content
@_content ||= begin
content_class = Boxspring.const_get( self.content_type ) \
rescue nil
content_class ?
content_class.new( self.attributes[ :content ] ) :
nil
end
end
|
#show ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/boxspring/story.rb', line 50
def show
@_show ||= begin
self.attributes.include?( :show ) ?
Show.new( self.attributes[ :show ] ) :
nil
end
end
|