Class: Rafflesia::PlatformIndexData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/platform/platform_index_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  index: :index,
  index_path: :index_path,
  runs_root: :runs_root,
  validation: :validation
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ PlatformIndexData

Returns a new instance of PlatformIndexData.



21
22
23
24
25
26
27
28
# File 'lib/rafflesia/platform/platform_index_data.rb', line 21

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @index = hash[:index] || {}
  @index_path = hash[:index_path]
  @runs_root = hash[:runs_root]
  @validation = hash[:validation] ? Rafflesia::PlatformValidationData.new(hash[:validation]) : nil
end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



15
16
17
# File 'lib/rafflesia/platform/platform_index_data.rb', line 15

def index
  @index
end

#index_pathObject

Returns the value of attribute index_path.



15
16
17
# File 'lib/rafflesia/platform/platform_index_data.rb', line 15

def index_path
  @index_path
end

#runs_rootObject

Returns the value of attribute runs_root.



15
16
17
# File 'lib/rafflesia/platform/platform_index_data.rb', line 15

def runs_root
  @runs_root
end

#validationObject

Returns the value of attribute validation.



15
16
17
# File 'lib/rafflesia/platform/platform_index_data.rb', line 15

def validation
  @validation
end