Class: Slidict::Deck

Inherits:
Object
  • Object
show all
Defined in:
lib/slidict/deck.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(topic:, duration:, audience:, goal:, framework: "slidev", slides: nil) ⇒ Deck

Returns a new instance of Deck.



9
10
11
12
13
14
15
16
# File 'lib/slidict/deck.rb', line 9

def initialize(topic:, duration:, audience:, goal:, framework: "slidev", slides: nil)
  @topic = normalize(topic, fallback: "Untitled presentation")
  @duration = normalize(duration, fallback: "5 minutes")
  @audience = normalize(audience, fallback: "general audience")
  @goal = normalize(goal, fallback: "understand the key message")
  @framework = normalize(framework, fallback: "slidev").downcase
  @slides = slides
end

Instance Attribute Details

#audienceObject (readonly)

Returns the value of attribute audience.



7
8
9
# File 'lib/slidict/deck.rb', line 7

def audience
  @audience
end

#durationObject (readonly)

Returns the value of attribute duration.



7
8
9
# File 'lib/slidict/deck.rb', line 7

def duration
  @duration
end

#frameworkObject (readonly)

Returns the value of attribute framework.



7
8
9
# File 'lib/slidict/deck.rb', line 7

def framework
  @framework
end

#goalObject (readonly)

Returns the value of attribute goal.



7
8
9
# File 'lib/slidict/deck.rb', line 7

def goal
  @goal
end

#topicObject (readonly)

Returns the value of attribute topic.



7
8
9
# File 'lib/slidict/deck.rb', line 7

def topic
  @topic
end

Instance Method Details

#slidesObject



18
19
20
# File 'lib/slidict/deck.rb', line 18

def slides
  @slides || default_slides
end