Class: Vueport::NodeClient

Inherits:
Object
  • Object
show all
Defined in:
lib/vueport/node_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, path: '/') ⇒ NodeClient

Returns a new instance of NodeClient.



7
8
9
10
# File 'lib/vueport/node_client.rb', line 7

def initialize(content, path: '/')
  self.content = content
  self.path = path
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/vueport/node_client.rb', line 5

def content
  @content
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/vueport/node_client.rb', line 5

def path
  @path
end

Instance Method Details

#run!Object



12
13
14
# File 'lib/vueport/node_client.rb', line 12

def run!
  render.force_encoding('UTF-8').encode!.html_safe
end