Class: ExCite::PushFormat

Inherits:
Object
  • Object
show all
Defined in:
app/models/ex_cite/push_format.rb

Overview

Citation class, holds data from format and/or resource key

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ PushFormat

Returns a new instance of PushFormat.



7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/ex_cite/push_format.rb', line 7

def initialize args = {}
  self.name = (args[:name] or 'Service')
  self.to_format = args[:to_format]
  self.action = (args[:action] or :render)
  self.template = (args[:template] or "ex_cite/cite/external_form")
  self.url = args[:url]
  self.method = (args[:method] or "POST")
  self.enctype = (args[:enctype] or "application/x-www-form-urlencoded")
  self.element_name = (args[:element_name] or "data")
  self.callback_protocol = (args[:protocol] or :http)
end

Instance Attribute Details

#actionObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def action
  @action
end

#callback_protocolObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def callback_protocol
  @callback_protocol
end

#element_nameObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def element_name
  @element_name
end

#enctypeObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def enctype
  @enctype
end

#methodObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def method
  @method
end

#nameObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def name
  @name
end

#templateObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def template
  @template
end

#to_formatObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def to_format
  @to_format
end

#urlObject

Required fields



5
6
7
# File 'app/models/ex_cite/push_format.rb', line 5

def url
  @url
end