Class: Pod::Thumbs::DependencyVote

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-thumbs/dependency_vote.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DependencyVote

Returns a new instance of DependencyVote.



11
12
13
14
15
# File 'lib/cocoapods-thumbs/dependency_vote.rb', line 11

def initialize(options = {})
  self.type = options[:type]
  self.voter = options[:voter]
  self.comment = options[:comment]
end

Instance Attribute Details

#commentObject

Returns the value of attribute comment.



9
10
11
# File 'lib/cocoapods-thumbs/dependency_vote.rb', line 9

def comment
  @comment
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/cocoapods-thumbs/dependency_vote.rb', line 7

def type
  @type
end

#voterObject

Returns the value of attribute voter.



8
9
10
# File 'lib/cocoapods-thumbs/dependency_vote.rb', line 8

def voter
  @voter
end

Instance Method Details

#type_stringObject



25
26
27
# File 'lib/cocoapods-thumbs/dependency_vote.rb', line 25

def type_string
  @type == :up ? "+".green : "-".red
end