Class: Otter::Post

Inherits:
Base
  • Object
show all
Defined in:
lib/otter/post.rb

Defined Under Namespace

Classes: Target

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

create, #initialize

Constructor Details

This class inherits a constructor from Otter::Base

Instance Method Details

#contentObject



16
17
18
# File 'lib/otter/post.rb', line 16

def content
  self.data['content']
end

#dateObject



12
13
14
# File 'lib/otter/post.rb', line 12

def date
  Time.at(Integer(self.data['date']))
end

#date_alphaObject



20
21
22
# File 'lib/otter/post.rb', line 20

def date_alpha
  self.data['date_alpha']
end


4
5
6
# File 'lib/otter/post.rb', line 4

def permalink_url
  self.data['permalink_url']
end

#targetObject



8
9
10
# File 'lib/otter/post.rb', line 8

def target
  @target ||= Target.new(self.data['target'])
end