class Standupguy::Report

Generic methods for all types of report.

Attributes

current_standup[RW]
date[RW]

Public Class Methods

new(date = nil) click to toggle source
# File lib/Standupguy.rb, line 93
def initialize(date = nil)
  @current_standup = JSON.load(File.open(filename))
  date ||= "ALL"
  @date = date == "ALL" ? :all : date_key(date)
end

Public Instance Methods

data(date = :all) click to toggle source
# File lib/Standupguy.rb, line 109
def data(date = :all)
  scope = @current_standup
  scope = { date => @current_standup[date] } unless date == :all
  scope
end
template(file) click to toggle source
# File lib/Standupguy.rb, line 103
def template(file)
  spec = Gem::Specification.find_by_name("Standupguy")
  gem_root = spec.gem_dir
  File.read(File.join(gem_root, "lib", "Standupguy", file))
end