Class: Publisher

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, opts = {}) ⇒ Publisher


4
5
6
7
8
9
10
# File 'lib/publisher.rb', line 4

def initialize(user, opts={})
  self.user = user
  self.open = opts[:open]
  self.prefill = opts[:prefill]
  self.public = opts[:public]
  self.explain = opts[:explain]
end

Instance Attribute Details

#explainObject

Returns the value of attribute explain


2
3
4
# File 'lib/publisher.rb', line 2

def explain
  @explain
end

#openObject

Returns the value of attribute open


2
3
4
# File 'lib/publisher.rb', line 2

def open
  @open
end

#prefillObject

Returns the value of attribute prefill


2
3
4
# File 'lib/publisher.rb', line 2

def prefill
  @prefill
end

#publicObject

Returns the value of attribute public


2
3
4
# File 'lib/publisher.rb', line 2

def public
  @public
end

#userObject

Returns the value of attribute user


2
3
4
# File 'lib/publisher.rb', line 2

def user
  @user
end

Instance Method Details

#explain?Boolean


24
25
26
# File 'lib/publisher.rb', line 24

def explain?
  self.explain
end

#open?Boolean


16
17
18
# File 'lib/publisher.rb', line 16

def open?
  self.open
end

#public?Boolean


20
21
22
# File 'lib/publisher.rb', line 20

def public?
  self.public
end

#textObject


12
13
14
# File 'lib/publisher.rb', line 12

def text
  formatted_message
end