Class: ShopifyCLI::Theme::Syncer::UnsupportedScriptWarning::Warning

Inherits:
Object
  • Object
show all
Defined in:
lib/shopify_cli/theme/syncer/unsupported_script_warning.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, warning_hash) ⇒ Warning

Returns a new instance of Warning.



71
72
73
74
75
# File 'lib/shopify_cli/theme/syncer/unsupported_script_warning.rb', line 71

def initialize(file, warning_hash)
  @file = file
  @line = warning_hash["line"].to_i
  @column = warning_hash["column"].to_i
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



69
70
71
# File 'lib/shopify_cli/theme/syncer/unsupported_script_warning.rb', line 69

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



69
70
71
# File 'lib/shopify_cli/theme/syncer/unsupported_script_warning.rb', line 69

def line
  @line
end

Instance Method Details

#line_contentObject



77
78
79
# File 'lib/shopify_cli/theme/syncer/unsupported_script_warning.rb', line 77

def line_content
  file_lines[line - 1]
end