Class: Yandex::Direct::ActionResult
- Inherits:
-
Object
- Object
- Yandex::Direct::ActionResult
- Includes:
- ActiveModel::Model
- Defined in:
- lib/yandex/direct/action_result.rb
Instance Attribute Summary collapse
-
#Errors ⇒ Object
Returns the value of attribute Errors.
-
#Id ⇒ Object
Returns the value of attribute Id.
-
#Warnings ⇒ Object
Returns the value of attribute Warnings.
Instance Method Summary collapse
- #errors? ⇒ Boolean
-
#initialize(*args) ⇒ ActionResult
constructor
A new instance of ActionResult.
- #warnings? ⇒ Boolean
Constructor Details
#initialize(*args) ⇒ ActionResult
Returns a new instance of ActionResult.
5 6 7 8 9 |
# File 'lib/yandex/direct/action_result.rb', line 5 def initialize(*args) super self.Warnings = Array(self.Warnings).map{|attributes| ExceptionNotification.new(attributes)} self.Errors = Array(self.Errors).map{|attributes| ExceptionNotification.new(attributes)} end |
Instance Attribute Details
#Errors ⇒ Object
Returns the value of attribute Errors.
4 5 6 |
# File 'lib/yandex/direct/action_result.rb', line 4 def Errors @Errors end |
#Id ⇒ Object
Returns the value of attribute Id.
4 5 6 |
# File 'lib/yandex/direct/action_result.rb', line 4 def Id @Id end |
#Warnings ⇒ Object
Returns the value of attribute Warnings.
4 5 6 |
# File 'lib/yandex/direct/action_result.rb', line 4 def Warnings @Warnings end |
Instance Method Details
#errors? ⇒ Boolean
10 11 12 |
# File 'lib/yandex/direct/action_result.rb', line 10 def errors? Array(self.Errors).compact.any? end |
#warnings? ⇒ Boolean
13 14 15 |
# File 'lib/yandex/direct/action_result.rb', line 13 def warnings? Array(self.Warnings).compact.any? end |