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



5
6
7
8
# File 'lib/lhc/formats/plain.rb', line 5

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

Instance Method Details

#as_json(input) ⇒ Object



14
15
16
# File 'lib/lhc/formats/plain.rb', line 14

def as_json(input)
  parse(input)
end

#as_open_struct(input) ⇒ Object



18
19
20
# File 'lib/lhc/formats/plain.rb', line 18

def as_open_struct(input)
  parse(input)
end

#format_options(options) ⇒ Object



10
11
12
# File 'lib/lhc/formats/plain.rb', line 10

def format_options(options)
  options
end

#to_body(input) ⇒ Object



22
23
24
# File 'lib/lhc/formats/plain.rb', line 22

def to_body(input)
  input
end

#to_sObject



26
27
28
# File 'lib/lhc/formats/plain.rb', line 26

def to_s
  'plain'
end

#to_symObject



30
31
32
# File 'lib/lhc/formats/plain.rb', line 30

def to_sym
  to_s.to_sym
end