Class: UrbanLexicophile::Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/urbanlexicophile/definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorObject

Returns the value of attribute author.



3
4
5
# File 'lib/urbanlexicophile/definition.rb', line 3

def author
  @author
end

#definitionObject

Returns the value of attribute definition.



3
4
5
# File 'lib/urbanlexicophile/definition.rb', line 3

def definition
  @definition
end

#downvotesObject

Returns the value of attribute downvotes.



3
4
5
# File 'lib/urbanlexicophile/definition.rb', line 3

def downvotes
  @downvotes
end

#exampleObject

Returns the value of attribute example.



3
4
5
# File 'lib/urbanlexicophile/definition.rb', line 3

def example
  @example
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/urbanlexicophile/definition.rb', line 3

def title
  @title
end

#upvotesObject

Returns the value of attribute upvotes.



3
4
5
# File 'lib/urbanlexicophile/definition.rb', line 3

def upvotes
  @upvotes
end

Instance Method Details

#scoreObject



5
6
7
# File 'lib/urbanlexicophile/definition.rb', line 5

def score
  return upvotes-downvotes
end