Class: Ace::Idea::Models::Idea

Inherits:
Struct
  • Object
show all
Defined in:
lib/ace/idea/models/idea.rb

Overview

Value object representing an idea Holds all metadata and content for a single idea

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attachmentsObject

Returns the value of attribute attachments

Returns:

  • (Object)

    the current value of attachments



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def attachments
  @attachments
end

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def content
  @content
end

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def created_at
  @created_at
end

#file_pathObject

Returns the value of attribute file_path

Returns:

  • (Object)

    the current value of file_path



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def file_path
  @file_path
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def id
  @id
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def 
  @metadata
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def path
  @path
end

#special_folderObject

Returns the value of attribute special_folder

Returns:

  • (Object)

    the current value of special_folder



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def special_folder
  @special_folder
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def status
  @status
end

#tagsObject

Returns the value of attribute tags

Returns:

  • (Object)

    the current value of tags



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def tags
  @tags
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



8
9
10
# File 'lib/ace/idea/models/idea.rb', line 8

def title
  @title
end

Instance Method Details

#shortcutObject

Short reference (last 3 chars of ID)



28
29
30
# File 'lib/ace/idea/models/idea.rb', line 28

def shortcut
  id[-3..] if id
end

#special?Boolean

Check if idea is in a special folder

Returns:

  • (Boolean)


33
34
35
# File 'lib/ace/idea/models/idea.rb', line 33

def special?
  !special_folder.nil?
end

#to_sObject

Display-friendly representation



23
24
25
# File 'lib/ace/idea/models/idea.rb', line 23

def to_s
  "Idea(#{id}: #{title})"
end