Class: CatEngine::Response

Inherits:
Struct
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion
Defined in:
lib/cat_engine/response.rb

Defined Under Namespace

Classes: XMLMapper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = nil) ⇒ Response

Returns a new instance of Response.



9
10
11
# File 'lib/cat_engine/response.rb', line 9

def initialize attributes = nil
  assign_attributes(attributes || {})
end

Instance Attribute Details

#beforeObject

Returns the value of attribute before

Returns:

  • (Object)

    the current value of before



5
6
7
# File 'lib/cat_engine/response.rb', line 5

def before
  @before
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



5
6
7
# File 'lib/cat_engine/response.rb', line 5

def id
  @id
end

#promis_idObject

Returns the value of attribute promis_id

Returns:

  • (Object)

    the current value of promis_id



5
6
7
# File 'lib/cat_engine/response.rb', line 5

def promis_id
  @promis_id
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



5
6
7
# File 'lib/cat_engine/response.rb', line 5

def title
  @title
end

Instance Method Details

#persisted?Boolean

Returns:

  • (Boolean)


17
# File 'lib/cat_engine/response.rb', line 17

def persisted?; false; end

#xml=(xml) ⇒ Object



13
14
15
# File 'lib/cat_engine/response.rb', line 13

def xml= xml
  assign_attributes XMLMapper.new(xml).to_h
end