Class: Ideapad::Idea

Inherits:
Object
  • Object
show all
Defined in:
lib/ideapad/idea.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(idea_text) ⇒ Idea

Returns a new instance of Idea.



7
8
9
10
# File 'lib/ideapad/idea.rb', line 7

def initialize(idea_text)
  @text = idea_text.strip
  @timestamp = Time.now
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



4
5
6
# File 'lib/ideapad/idea.rb', line 4

def text
  @text
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



5
6
7
# File 'lib/ideapad/idea.rb', line 5

def timestamp
  @timestamp
end