Class: Wallaby::Resources::Index::InetHtml

Inherits:
Cell
  • Object
show all
Defined in:
app/views/wallaby/resources/index/inet_html.rb

Overview

Html cell

Direct Known Subclasses

CidrHtml

Instance Method Summary collapse

Instance Method Details

#renderString

Returns:

  • (String)


9
10
11
12
13
14
15
16
17
18
19
# File 'app/views/wallaby/resources/index/inet_html.rb', line 9

def render
  if value.nil?
    null
  else
    concat (:code, value)
    link_to(
      fa_icon('link'), "http://ip-api.com/##{value}",
      target: :_blank, class: 'text-info'
    )
  end
end