Class: Depix::Describe

Inherits:
Object
  • Object
show all
Includes:
Term::ANSIColor
Defined in:
lib/depix/describe.rb

Overview

Returns terminal-ready colorized descriptions of DPX headers per file

Instance Method Summary collapse

Instance Method Details

#describe(path, compact = false) ⇒ Object

Returns a printable report on all the headers present in the file at the path passed



6
7
8
9
# File 'lib/depix/describe.rb', line 6

def describe(path, compact = false)
  struct = Depix.from_file(path, compact)
  describe_struct(struct) + describe_synthetics_of_struct(struct)
end

#describe_synthetics(path, compact) ⇒ Object

Returns descriptions of the shorthand synthetic properties



12
13
14
15
# File 'lib/depix/describe.rb', line 12

def describe_synthetics(path, compact)
  struct = Depix.from_file(path, compact)
  describe_synthetics_of_struct(struct)
end