Class: Dropdown::Blog

Inherits:
Object
  • Object
show all
Defined in:
lib/dropdown/blog.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source = nil, reader = Dropdown::Readers::FileReader.new) ⇒ Blog

Returns a new instance of Blog.



6
7
8
9
10
11
# File 'lib/dropdown/blog.rb', line 6

def initialize(source=nil, reader=Dropdown::Readers::FileReader.new)
  @source = source
  @reader = reader
  @posts = []
  collect
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/dropdown/blog.rb', line 3

def name
  @name
end

#postsObject (readonly)

Returns the value of attribute posts.



4
5
6
# File 'lib/dropdown/blog.rb', line 4

def posts
  @posts
end

#readerObject (readonly)

Returns the value of attribute reader.



4
5
6
# File 'lib/dropdown/blog.rb', line 4

def reader
  @reader
end

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/dropdown/blog.rb', line 3

def source
  @source
end