Module: VizBuilder::Helpers

Defined in:
lib/vizbuilder.rb

Overview

The Helpers module holds methods that are added to both the config and template contexts. So you can use these in the config block and in templates.

Instance Method Summary collapse

Instance Method Details

#build?Boolean

Are we building this app out?

Returns:

  • (Boolean)


349
350
351
# File 'lib/vizbuilder.rb', line 349

def build?
  config[:mode] == :build
end

#development?Boolean

Is this in development?

Returns:

  • (Boolean)


359
360
361
# File 'lib/vizbuilder.rb', line 359

def development?
  config[:target] == :development
end

#production?Boolean

Is this in production?

Returns:

  • (Boolean)


354
355
356
# File 'lib/vizbuilder.rb', line 354

def production?
  config[:target] == :production
end

#server?Boolean

Are we running as a server?

Returns:

  • (Boolean)


344
345
346
# File 'lib/vizbuilder.rb', line 344

def server?
  config[:mode] == :server
end