Sha256: 0b51d7ed316f8e6ed1b7257ec2a35592f53aaa85ea0c846ee86ecc10f3215af6

Contents?: true

Size: 1.3 KB

Versions: 25

Compression:

Stored size: 1.3 KB

Contents

class Brief::Apps::Blueprint::Epic
  include Brief::Model

  meta do
    title
    subheading
    status String, :in => %w(draft published)
  end

  example <<-EOF
---
type: epic
status: draft
---

# Epic Title

Write a description for your epic.

# User Stories

## User Story Title

As a **PERSONA** I would like to **BEHAVIOR** so that I can **GOAL**
  EOF

  template <<-EOF
# <%= object.title %>
# User Stories
<% Array(object.user_stories).each do |user_story| %>
## <%= user_story.title %>
As a **User** I would like to **Do this** so that I can **succeed**
<% end %>
  EOF

  content do
    title "h1:first-of-type"
    paragraph "p:first-of-type"
    paragraphs "p"

    define_section "User Stories" do
      each("h2").has(:title     => "h2",
                     :paragraph => "p:first-of-type",
                     :components   => "p:first-of-type strong"
                    )

      each("h2").is_a :user_story
    end
  end

  helpers do
    def user_stories
      sections.user_stories.items.map do |item|
        item.components = Array(item.components)

        item.merge(goal: item.components[2],
                   persona: item.components[0],
                   behavior: item.components[1])
      end
    end
  end

  actions do
    def publish_to_github
    end

    def custom_action
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
brief-1.9.9 apps/blueprint/models/epic.rb
brief-1.9.8 apps/blueprint/models/epic.rb
brief-1.9.7 apps/blueprint/models/epic.rb
brief-1.9.6 apps/blueprint/models/epic.rb
brief-1.9.4 apps/blueprint/models/epic.rb
brief-1.9.3 apps/blueprint/models/epic.rb
brief-1.9.2 apps/blueprint/models/epic.rb
brief-1.9.1 apps/blueprint/models/epic.rb
brief-1.9.0 apps/blueprint/models/epic.rb
brief-1.8.12 apps/blueprint/models/epic.rb
brief-1.8.11 apps/blueprint/models/epic.rb
brief-1.8.10 apps/blueprint/models/epic.rb
brief-1.8.9 apps/blueprint/models/epic.rb
brief-1.8.8 apps/blueprint/models/epic.rb
brief-1.8.6 apps/blueprint/models/epic.rb
brief-1.8.5 apps/blueprint/models/epic.rb
brief-1.8.4 apps/blueprint/models/epic.rb
brief-1.8.3 apps/blueprint/models/epic.rb
brief-1.8.2 apps/blueprint/models/epic.rb
brief-1.8.1 apps/blueprint/models/epic.rb