Class: LHC::Formats::Plain

Inherits:
LHC::Format show all
Includes:
BasicMethodsConcern
Defined in:
lib/lhc/formats/plain.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.request(options) ⇒ Object



7
8
9
10
# File 'lib/lhc/formats/plain.rb', line 7

def self.request(options)
  options[:format] = new
  super(options)
end

Instance Method Details

#as_json(input) ⇒ Object



16
17
18
# File 'lib/lhc/formats/plain.rb', line 16

def as_json(input)
  parse(input)
end

#as_open_struct(input) ⇒ Object



20
21
22
# File 'lib/lhc/formats/plain.rb', line 20

def as_open_struct(input)
  parse(input)
end

#format_options(options) ⇒ Object



12
13
14
# File 'lib/lhc/formats/plain.rb', line 12

def format_options(options)
  options
end

#to_body(input) ⇒ Object



24
25
26
# File 'lib/lhc/formats/plain.rb', line 24

def to_body(input)
  input
end

#to_sObject



28
29
30
# File 'lib/lhc/formats/plain.rb', line 28

def to_s
  'plain'
end

#to_symObject



32
33
34
# File 'lib/lhc/formats/plain.rb', line 32

def to_sym
  to_s.to_sym
end