Class: StaticRails::Site

Inherits:
Struct
  • Object
show all
Defined in:
lib/static-rails/site.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url_root_path: "/", url_skip_paths_starting_with: [], start_server: !Rails.env.production?,, ping_server: true, env: {}, server_host: "localhost", server_path: "/", **other_kwargs) ⇒ Site

Returns a new instance of Site.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/static-rails/site.rb', line 21

def initialize(
  url_root_path: "/",
  url_skip_paths_starting_with: [],
  start_server: !Rails.env.production?,
  ping_server: true,
  env: {},
  server_host: "localhost",
  server_path: "/",
  **other_kwargs
)
  @url_root_path = url_root_path
  @url_skip_paths_starting_with = url_skip_paths_starting_with
  @start_server = start_server
  @ping_server = ping_server
  @env = env
  @server_host = server_host
  @server_path = server_path
  super
end

Instance Attribute Details

#compile_404_file_pathObject

Returns the value of attribute compile_404_file_path

Returns:

  • (Object)

    the current value of compile_404_file_path



2
3
4
# File 'lib/static-rails/site.rb', line 2

def compile_404_file_path
  @compile_404_file_path
end

#compile_commandObject

Returns the value of attribute compile_command

Returns:

  • (Object)

    the current value of compile_command



2
3
4
# File 'lib/static-rails/site.rb', line 2

def compile_command
  @compile_command
end

#compile_dirObject

Returns the value of attribute compile_dir

Returns:

  • (Object)

    the current value of compile_dir



2
3
4
# File 'lib/static-rails/site.rb', line 2

def compile_dir
  @compile_dir
end

#envObject

Returns the value of attribute env

Returns:

  • (Object)

    the current value of env



2
3
4
# File 'lib/static-rails/site.rb', line 2

def env
  @env
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



2
3
4
# File 'lib/static-rails/site.rb', line 2

def name
  @name
end

#ping_serverObject

Returns the value of attribute ping_server

Returns:

  • (Object)

    the current value of ping_server



2
3
4
# File 'lib/static-rails/site.rb', line 2

def ping_server
  @ping_server
end

#server_commandObject

Returns the value of attribute server_command

Returns:

  • (Object)

    the current value of server_command



2
3
4
# File 'lib/static-rails/site.rb', line 2

def server_command
  @server_command
end

#server_hostObject

Returns the value of attribute server_host

Returns:

  • (Object)

    the current value of server_host



2
3
4
# File 'lib/static-rails/site.rb', line 2

def server_host
  @server_host
end

#server_pathObject

Returns the value of attribute server_path

Returns:

  • (Object)

    the current value of server_path



2
3
4
# File 'lib/static-rails/site.rb', line 2

def server_path
  @server_path
end

#server_portObject

Returns the value of attribute server_port

Returns:

  • (Object)

    the current value of server_port



2
3
4
# File 'lib/static-rails/site.rb', line 2

def server_port
  @server_port
end

#source_dirObject

Returns the value of attribute source_dir

Returns:

  • (Object)

    the current value of source_dir



2
3
4
# File 'lib/static-rails/site.rb', line 2

def source_dir
  @source_dir
end

#start_serverObject

Returns the value of attribute start_server

Returns:

  • (Object)

    the current value of start_server



2
3
4
# File 'lib/static-rails/site.rb', line 2

def start_server
  @start_server
end

#url_root_pathObject

Returns the value of attribute url_root_path

Returns:

  • (Object)

    the current value of url_root_path



2
3
4
# File 'lib/static-rails/site.rb', line 2

def url_root_path
  @url_root_path
end

#url_skip_paths_starting_withObject

Returns the value of attribute url_skip_paths_starting_with

Returns:

  • (Object)

    the current value of url_skip_paths_starting_with



2
3
4
# File 'lib/static-rails/site.rb', line 2

def url_skip_paths_starting_with
  @url_skip_paths_starting_with
end

#url_subdomainObject

Returns the value of attribute url_subdomain

Returns:

  • (Object)

    the current value of url_subdomain



2
3
4
# File 'lib/static-rails/site.rb', line 2

def url_subdomain
  @url_subdomain
end