Class: ThemeCheck::ShopifyLiquid::SourceIndex::BaseEntry

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ BaseEntry

Returns a new instance of BaseEntry.



15
16
17
18
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 15

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/theme_check/shopify_liquid/source_index/base_entry.rb', line 11

def hash
  @hash
end

#return_typeObject



44
45
46
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 44

def return_type
  @return_type || to_s
end

Instance Method Details

#deprecated?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 32

def deprecated?
  hash['deprecated']
end

#deprecation_reasonObject



36
37
38
39
40
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 36

def deprecation_reason
  return nil unless deprecated?

  hash['deprecation_reason'] || nil
end

#descriptionObject



28
29
30
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 28

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

#nameObject



20
21
22
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 20

def name
  hash['name']
end

#return_type_instanceObject



48
49
50
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 48

def return_type_instance
  ReturnTypeEntry.new(return_type_hash)
end

#summaryObject



24
25
26
# File 'lib/theme_check/shopify_liquid/source_index/base_entry.rb', line 24

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