Class: PlatformosCheck::PlatformosLiquid::SourceIndex::BaseEntry

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/platformos_check/platformos_liquid/source_index/base_entry.rb

Constant Summary collapse

PLATFORMOS_DOCUMENTATION_URL =
"https://documentation.platformos.com"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ BaseEntry

Returns a new instance of BaseEntry.



17
18
19
20
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 17

def initialize(hash = {})
  @hash = hash || {}
  @return_type = nil
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



11
12
13
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 11

def hash
  @hash
end

#return_typeObject



50
51
52
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 50

def return_type
  @return_type || to_s
end

Instance Method Details

#deprecated?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 34

def deprecated?
  hash['deprecated']
end

#deprecation_reasonObject



38
39
40
41
42
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 38

def deprecation_reason
  return nil unless deprecated?

  hash['deprecation_reason'] || nil
end

#descriptionObject



30
31
32
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 30

def description
  hash['description'] || ''
end

#nameObject



22
23
24
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 22

def name
  hash['name']
end

#platformos_documentation_urlObject



44
45
46
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 44

def platformos_documentation_url
  PLATFORMOS_DOCUMENTATION_URL
end

#return_type_instanceObject



54
55
56
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 54

def return_type_instance
  ReturnTypeEntry.new(return_type_hash)
end

#summaryObject



26
27
28
# File 'lib/platformos_check/platformos_liquid/source_index/base_entry.rb', line 26

def summary
  hash['summary'] || ''
end