Class: Smyte::Notification::Label

Inherits:
Object
  • Object
show all
Defined in:
lib/smyte/notification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Label

Returns a new instance of Label.



83
84
85
86
# File 'lib/smyte/notification.rb', line 83

def initialize(response)
  @name = response["labelName"]
  @response = response
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



82
83
84
# File 'lib/smyte/notification.rb', line 82

def name
  @name
end

#responseObject (readonly)

Returns the value of attribute response.



82
83
84
# File 'lib/smyte/notification.rb', line 82

def response
  @response
end

Instance Method Details

#actionObject

returns :block, :review, :allow, :unknown



89
90
91
# File 'lib/smyte/notification.rb', line 89

def action
  @action ||= calculate_action
end

#experimental?Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/smyte/notification.rb', line 93

def experimental?
  response["labelType"] == "PENDING"
end