Class: Contextizer::Context

Inherits:
Struct
  • Object
show all
Defined in:
lib/contextizer/context.rb

Overview

A value object that holds all the collected information about a project. This object is the result of the Collector phase and the input for the Renderer phase.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



15
16
17
18
19
20
# File 'lib/contextizer/context.rb', line 15

def initialize(*)
  super
  self. ||= {}
  self.files ||= []
  self.timestamp ||= Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
end

Instance Attribute Details

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



6
7
8
# File 'lib/contextizer/context.rb', line 6

def command
  @command
end

#filesObject

Returns the value of attribute files

Returns:

  • (Object)

    the current value of files



6
7
8
# File 'lib/contextizer/context.rb', line 6

def files
  @files
end

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



6
7
8
# File 'lib/contextizer/context.rb', line 6

def 
  
end

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



6
7
8
# File 'lib/contextizer/context.rb', line 6

def project_name
  @project_name
end

#target_pathObject

Returns the value of attribute target_path

Returns:

  • (Object)

    the current value of target_path



6
7
8
# File 'lib/contextizer/context.rb', line 6

def target_path
  @target_path
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



6
7
8
# File 'lib/contextizer/context.rb', line 6

def timestamp
  @timestamp
end